Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This has been a bother to me since Squeeze. I've included the question in
some of my other posts, but I still don't have an answer/solution; ... at least one I understand.
For extended times, sometimes as long as 12 minutes, my Desktop is using 100% CPU. I know this because it slows to a crawl, the 'SysMon' graph and its CPU usage counter are frozen on "100%".
However, both 'top' and the 'SysMon' Process Table show low CPU usage; sometimes as low as 17% at the same time.
The question is: what is running in the backgroud that I can't identify?
Almost all of your swap space is used and only 77meg is loaded into RAM caches.
This indicates that you're running either a very few, or one, really big, memory-hogging program -or- a lot of system services and a few programs. In either case you're using almost 1gig of memory (adding swap used to RAM used) on a system with 500meg of RAM. Multi-tasking and swap space allow this to happen but the penalty is lots of waiting for the system to swap in and out the programs that are running. Even programs on your desktop whose windows are not active right now get swapped in and out as they get a slice of CPU to see if there is anything for them to do. So do system services that are not being used _right_now_.
You have a few options: add RAM to your system; run less at a time on your system; (least attractive) continue to live with it.
Adding RAM is the most attractive option but I realize that this may not be possible.
Running less at a time - there are a lot of ways to do this. Start not running system services you aren't really using. Is ftp running? If so, and this isn't an ftp server, then stop it. If sshd is running and you don't do ssh logins to this system from other systems then stop it.
Are you running KDE, Gnome, or some other 'heavy' desktop environment? Try something smaller like XFCE, fluxbox, or simply turn off some destop options, eye-candy, and the like.
If you're torrenting files/Linux distros/other stuff all of the time? Try reducing the number of torrents running at a time. Use your torrent client's controls to limit the amount of RAM or CPU used, or schedule torrents to run when you're asleep or at work.
Are you editing documents while making spreadsheets while watching youtube, crackle, internet archive videos? Try doing only one or two of those things at a time. For me, Adobe Flash videos take up a lot of CPU and RAM on older hardware.
Your amount of RAM is low for modern Linux distros and their (usually) heavyweight Desktop Environments.
EDIT: Faster hard disk / SSD replacement would reduce the 12 minute wait times, but those are bandaids and treat the symptoms without treating the real problem, which appears to be memory pressure.
Short Story: I need to add memory because a mystery something is running:
Code:
... one, really big, memory-hogging program -or- a lot of system services and a few programs.
That is what I am hoping to discover. Neither 'top' nor 'SysMon' P/O's show anything running that's would account for the CPU biding in wait or whatever is hogging the Memory. Why would, my "...CPU line show 88.1% of CPU is being spent in 'wa'iting on disk I/O.'?
Where/how do I identify system services that don't show up with 'top'? There should be a way to manage what services are not necessary when just running low-demand programs such as those in 'top' P/O below; eh?
As far as I know, I'm not/shouldn't be running ftp or sshd. My installation included KDE, but I have never called it up. My Desktop uses the “Top & Bottom Expanded Edge Panels” and I use Dolphin to manage files. There is a ton of GNOME junk that came with this installation although I did my best to avoid it. I didn't want it, but didn't know how to keep it out. If there is a way to uninstall or purge it, from this install without crashing my system, I'll do it.
Code:
Linux royrogers 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux
As far as extra memory is concerned, I gather I can either have a geek install it on my Mother Board, or get a Memory Stick. I'd lean toward employing the geek. My confusion here derives from the press that has consistently maintained Linux is designed to run on/reinvigorate older systems. Something doesn't add up here. Although 512 MB RAM @ 2.66 GHz isn't 'state-of-the-art', it's pretty doggone nimble considering that I'm running as 'bare-bones' as I know how to right now.
Just so there's no misunderstanding, I'm not complaining ... the problem is mine to solve. I just don't have the 'wet ware' to resolve it.
Also '~$ locate Xfce' does not show 'Xfce' although I undestand it is supposed to be included with Wheezy!!
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by r00ster
My installation included KDE, but I have never called it up.
What do you mean never called it up? You don't use KDE desktop?
I would say 512 MB is too little memory for a heavy desktop like Gnome or KDE, hence the question. LXDE or Fluxbox should run smooth.
However, the phenomenon is not not unknown to me. Since Squeeze I have the same problem. After some time (could be days) the memory is being swapped to disk, and that goes on and on and on.
I have posted this thread: http://forums.debian.net/viewtopic.p...58160&start=30 about that problem, but it is denied that it is a problem in Debian. If you read my posts then I don't have to duplicate the complete story here.
IMHO, if swapping starts and it never ends, and the memory using process cannot be identified, there is a problem. And I am talking about 2 GB and 4 GB machines.
Something strange to be added as a recent development. I have a laptop with 2 GB RAM, also running Squeeze. It is fairly old, a Lenovo T61, but the best laptop I ever had, so I didn't scrap it. This laptop did not show the swapping behaviour. But a few weeks ago I replace the original 80GB disk with a new 320 GB disk. I copied everything on file level (not dd, but rsync). Since that time, the swapping occurs every few days. Totally unexplainable.
I'll be happy to try to help you narrow it down, first, a couple of questions because I run Slackware and not Debian.
To get an equivalent to your top display I have to enter the command
Code:
top -b -n 1
and then trim a lot off of the bottom of the top output.
My top starts in interactive mode, refreshing the entire console window every 3 seconds. Does yours do the same?
My top originally started in white text only. Does yours, or is yours in color?
Assuming yours started as mine did, try this:
1. Start top
2. Press a capital A and four windows should appear.
3. Resize the console to be almost as tall as the screen, the four windows should resize equally within the new space.
4. Notice that the upper left should change to say 1EFto indicate the active window (the first, or topmost window should be the Default window)
5. Press c to show the entire command line for each command
6. Press z to colorize the display
7. Press y to turn the active row at top sample time to white
8. Press x to turn the active (sort) column to white
9. Press a to change to the Job window (the second one), the upper left should change to 2:Job
10. Repeat steps 5 to 9, the upper left should change to 3:Mem (memory, we'll spend our time mostly here)
11. Press > (shift . on my keyboard) twice to move the sort column to VIRT (SWAP would be roughly as good, more below)
12. Repeat steps 5 to 9, the upper left should change to 4:Usr
13. Repeat steps 5 to 8.
14. Press W to write your current setup to .toprc so the next time you start this view should be restored.
In the 3:Mem window:
VIRTual size = SWAP space + RESident (in RAM)
nFLT = the number of hard swaps (these require I/O to disk for the swap)
Leave this window running and occasionally check on the VIRT, SWAP, RES, and nFLT columns of 3:Mem.
We're sorting on VIRT so that the (one, we're assuming, maybe) program that starts using all free RAM and then starts using SWAP will be at the top of the list. Regardless, the program(s) using the most RAM and SWAP will be at the top of the list.
Assuming that only one running program is either consuming much RAM or has a 'memory leak' and loses some RAM that it is allocating repeatedly then I would expect that VIRT and RES would grow until too much RAM is consumed, then VIRT and SWAP would grow as ever more and more allocated RAM is moved to SWAP. You probably won't notice a performance problem until SWAP usage starts going up. You might try to catch ever-growing RAM usage
Once SWAP starts growing then nFLT should start growing as page faults begin forcing disk I/O.
Look at the 'command' column. Which program or programs is doing this?
As for checking which system services are running on Debian, I don't know how to tell you to do that. Google and other questions here are your friend.
Last edited by jamesf; 10-13-2013 at 10:10 PM.
Reason: got the example top command options wrong, fixed. edit2 was swapping the keys to press for steps 7 and 8.
Why would, my "...CPU line show 88.1% of CPU is being spent in 'wa'iting on disk I/O.'?
Because your system is in a state such that it cannot do any other work until it retrieves swapped out code/memory from the swap file on disk. So, before any other thing can happen the disk read or write must complete.
Note that this is simplified a tiny bit. System hardware interrupts are still being serviced, clocks are updating, etc. _but_ nothing that _you're_ doing can happen until the I/O completes.
top, iotop, and strace can help you track this down, but the process can get rather advanced.
My confusion here derives from the press that has consistently maintained Linux is designed to run on/reinvigorate older systems.
It _can_. Rather naturally the default for most Linux distributions is to assume modern hardware, which 512MB and 2.66GHz is not.
As with anything you have to manage things to run well on what you have. Hopefully you can get help learning how to manage Debian Wheezy(?) on a system like yours here.
Quote:
Something doesn't add up here. Although 512 MB RAM @ 2.66 GHz isn't 'state-of-the-art', it's pretty doggone nimble considering that I' m running as 'bare-bones' as possible.
I agree that 512MB and 2.66GHz (about what I'm running on several systems here) should be capable of 'pretty doggone nimble', it is for me.
I'm not trying to be preachy, nor am I trying to be rude, but consider re-wording the last part of that quote to "I'm running as 'bare-bones' as I know how to right now".
Remember, there's always more to learn. I pick up new, helpful things daily! ;vD
NOTE: Some things you'll google about memory use, swap use, etc., will suggest changing 'swappiness' (in /proc/sys/swappiness). That would be correct for some situations but when you're using all RAM _and_ all SWAP then the real problem lies elsewhere.
Your main problems are not that Linux isn't lightweight enough for your machine, they are that you run programs that are not designed to be lightweight, like Firefox and Libre- or OpenOffice. Replace them with more lightweight versions (for example Midori as browser, AbiWord/Gnumeric for office tasks) and this should happen less often.
My top starts in interactive mode, refreshing the entire console window every 3 seconds. Does yours do the same?
Yes.
Quote:
My top originally started in white text only. Does yours, or is yours in color?
I changed the Konsole (:bash shell) “Settings” => “Configuration” => “Appearance” to Green on Black. Iterations of what is being 'monitored?' appear in cyan. “Terminal” output on the other hand does present traditional color coded lines. Reading further in your post, I'm assuming you want me to use “Konsole” (:bash shell) instead of “Terminal”.
Quote:
Assuming yours started as mine did, try this:
1. Start top
2. Press a capital A and four windows should appear.
Not quite. P/O is all on 1 window as below. I couldn't find a way to split the 4 Outputs into separate windows.
Code:
~$ top
1:Def - 16:12:01 up 2:24, 2 users, load average: 0.22, 0.43, 0.60
Tasks: 127 total, 1 running, 126 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.8 us, 5.9 sy, 0.0 ni, 85.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 505432 total, 489212 used, 16220 free, 6896 buffers
KiB Swap: 498008 total, 170732 used, 327276 free, 205372 cached
1 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3510 rooster 20 0 137m 11m 8120 S 6.0 2.4 8:47.82 ksysguard
2443 root 20 0 55968 24m 6876 S 3.6 4.9 9:38.26 Xorg
3507 rooster 20 0 862m 143m 20m S 2.3 29.1 8:00.69 iceweasel
4667 rooster 20 0 4508 1360 996 R 1.0 0.3 0:00.18 top
2 PID PPID TIME+ %CPU %MEM PR NI S VIRT SWAP RES UID COMMAND
4668 2 0:00.00 0.0 0.0 20 0 S 0 0 0 0 kworker/u:1
4667 4570 0:00.18 1.0 0.3 20 0 R 4508 0 1360 1000 top
4639 2 0:00.19 0.0 0.0 20 0 S 0 0 0 0 kworker/u:2
4570 4568 0:00.12 0.0 0.5 20 0 S 5296 0 2476 1000 bash
3 PID %MEM VIRT SWAP RES CODE DATA SHR nMaj nDRT S PR NI %CPU COMMAND
3507 29.1 862m 50m 143m 100 461m 20m 4738 0 S 20 0 2.3 iceweasel
3710 11.0 280m 20m 54m 4 90m 36m 4373 0 S 20 0 0.0 soffice.bin
4568 6.1 116m 0 30m 4 13m 23m 234 0 S 20 0 0.7 konsole
2443 4.9 55968 3932 24m 1952 22m 6876 937 0 S 20 0 3.6 Xorg
4 PID PPID UID USER RUSER TTY TIME+ %CPU %MEM S COMMAND
1833 1 105 statd statd ? 0:00.00 0.0 0.0 S rpc.statd
3289 1 111 rtkit rtkit ? 0:00.08 0.0 0.0 S rtkit-daemon
1 0 0 root root ? 0:01.07 0.0 0.0 S init
2 0 0 root root ? 0:00.00 0.0 0.0 S kthreadd
3 2 0 root root ? 0:01.69 0.3 0.0 S ksoftirqd/0
rooster@royrogers:~$
I'm following the posts one-at-a-time in the order in which they appear. 'You's guyses' have really outdone yourselves to help me. I really appreciate all you hard, time-consuming work.
Last edited by r00ster; 10-14-2013 at 06:42 PM.
Reason: clarification
According to the old, pre-GUI way of talking about things, 'windows' of specific applications, like 'top', were separate, distinctly addressed areas of the screen.
top treats, and calls, each of the 1, 2, 3, 4 areas of output a window. Your four windows are set up correctly. Now make the konsole bigger vertically and each area will grow, showing you more output. That is assuming that you're running konsole from within your desktop environment (GUI).
I think, though, that TobiSGD nailed it in post #9. Keep watching the 3:Mem window for a few days without rebooting in case a program you're running is leaking memory, but I share TobiSGD's general opinion.
You're running several heavyweight applications heavily at the same time.
Firefox (and its fork iceweasel) is big and every additional tab, youtube video, flash game, etc. takes more and more of your scarce RAM. You're already using SWAP and you'll soon be using more.
soffice.bin (probably OpenOffice) is big and even bigger with java integration between the applications. On Linux platforms I believe that the java integration comes installed as default.
Seek smaller alternatives or run the big programs one at a time. He already gave you a couple of alternatives in post #9.
You also mentioned using dolphin. That isn't small. On a machine similar to the one you're running I used a smaller browser (like Midori), a smaller word processor and smaller spreadsheet application, and used XFE instead of dolphin or nautilus.
Your machine will run larger programs surprisingly fine one at a time. It will easily handle smaller alternatives several at a time.
What it won't do fine is run several modern programs built to modern-ish specs at a time on 2005-era machine specs.
top treats, and calls, each of the 1, 2, 3, 4 areas of output a window. Your four windows are set up correctly. Now make the konsole bigger vertically and each area will grow, showing you more output. That is assuming that you're running konsole from within your desktop environment (GUI).
I'm not following. I can't make the konsole bigger vertically or horizontally. It's already a full page/screen. The only options I know about would be to split the screen horizontally; then split each screen vertically. That would give me 4 screens. But I don't think that is what you intend. They would be identical.
Konsole on my system is a ':bash shell' from: "Applications Menu" => "System Tools" => "Konsole". Or, I can use Dolphin to invoke the Terminal Emulator. But that displays exactly the same. "Profile" => "Key Bindings" "Input" is set for (Default Xfree4)
WRT "Leakage": After Startup, SysMon reads:
Memory 281MiB/493 MiB.
Swap 66.0MiB/486MiB
Same time, top shows:
I'm not following. I can't make the konsole bigger vertically or horizontally. It's already a full page/screen. The only options I know about would be to split the screen horizontally; then split each screen vertically. That would give me 4 screens. But I don't think that is what you intend. They would be identical.
top is what is calling them windows, not your GUI. Your personal definition of 'window' is not expansive enough. top calls the areas 1, 2, 3, and 4 'windows'. It is really that simple, all under the control of 'top'.
Quote:
WRT "Leakage": After Startup, SysMon reads:
Memory 281MiB/493 MiB.
Swap 66.0MiB/486MiB
Same time, top shows:
It doesn't "look like" leakage. But something is skewed up.
SysMon and top are reporting things differently. They are different tools, made to do different things, with different target audiences, and so they report things differently.
Try 'free' from konsole. It is reporting much the same stuff read 'man free' and 'man top' for a better understanding of what they are measuring and how they're reporting it.
ONE:
I can run W-XP on the legacy Slave Drive with all kinds of stuff running at the same time. E.g., AVG, Scotty WatchDog, GuardDog Firewall, MS Word, Firefox, and the Music Player running through a file.
TWO:
When I installed the new HDD, making it Master, I installed Etch with the same partition configuration I've used for Lenny, Squeeze and now Wheezy. Etch ran like a dream. BUT, Lenny, Squeeze and Wheezy have plagued me with random system freeezes, sluggish scrolling,... I can't even run Amarok for more than a few minutes.
THREE:
Both KDE and Gnome came with this .iso/install. Could this explain why so much memory is being accessed? What would happen if I unistalled Gnome?
I'm contemplating adding 2G of memory. It's available for my unit. But does it really make sense considering its performance with W-XP and Etch? Are we really saying the last 3 Deb distros take more memory and CPU than W-XP?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.