Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Linux Ubuntu thrashing at just 300MB/512MB RAM usage
New Posts  All Forums:Forum Nav:

Linux Ubuntu thrashing at just 300MB/512MB RAM usage

post #1 of 20
Thread Starter 
I'm having a problem with thrashing and RAM usage. Specs:
Intel Pentium M 735 1.7Ghz
512MB DDR2-400Mhz (sadly it's all the mobo will support) - 483MB visible due to IGP
40GB 4200RPM HDD (to be upgraded to a 5400RPM but the new drive isn't here yet)
Ubuntu 11.04 (running GNOME, not Unity)

I experience a serious problem with RAM usage. It seems every time I hit around 320/483MB, the OS starts thrashing (writing RAM to the hard drive) like crazy. Because the HDD I currently have is a rather slow 4200RPM, this is a huge problem for me. I use the laptop for web browsing only. The only potentially RAM intensive app I use is Firefox 5, but I'm sure that's not contributing to this problem at all. Even with 10 tabs open I get an excellent ~150MB RAM usage, as I have personally found that Firefox adapts to amount of RAM on your system. If Firefox is causing this though, why is it doing so while there is still a significant amount of RAM left?

I have a feeling the OS is doing it. I'm not sure if it's a setting in the kernel (which I recompiled myself lately) or somewhere else in the OS, but it always seems to start using the swap partition/pagefile way too early, causing huge performance decrease and problems on my end. Otherwise the laptop is fast enough for my needs.

Any thoughts? Ways to solve?
post #2 of 20
haha I saw the title and thought it was about me. tongue.gif
Sorry I don't have a solution to your problem either.
post #3 of 20
Firstly, I would make sure that you're actually seeing "thrashing." It is perfectly normal to see some swap space usage even if you are not running out of memory. Look at the 'so' column of vmstat's output. If it's a high number, that means you are getting a lot of page faults. If the 'si' column is also high, then you are "thrashing."

If you *really* want to reduce swap usage, look at tuning your kernel's "vm.swappiness" parameter. Some people think that setting this to a lower number (30ish) will result in a more responsive desktop (you almost always want higher swappiness on a server.) Keep in mind that swap usage is *not a bad thing* and the operating system will use any extra memory gained by swapping out inactive pages for things like filesystem cache and other buffers. Having some pages swapped out can actually _increase_ system performance.
Edited by markatto - 7/21/11 at 1:38pm
my baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 4.0 EVGA 780i 2x GTS 512 SLi 770/linked/1050 2x 2gb G.Skill PQ DDR2-1000 
Hard DriveOSMonitorKeyboard
2x 250Gb 7200.10 (raid 0) Arch Linux 64 Samsung T240 Saitek eclipse 
PowerCaseMouse
OCZ GameXStream 700 watt Cooler Master 690 Razer Deathadder 
  hide details  
Reply
my baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 4.0 EVGA 780i 2x GTS 512 SLi 770/linked/1050 2x 2gb G.Skill PQ DDR2-1000 
Hard DriveOSMonitorKeyboard
2x 250Gb 7200.10 (raid 0) Arch Linux 64 Samsung T240 Saitek eclipse 
PowerCaseMouse
OCZ GameXStream 700 watt Cooler Master 690 Razer Deathadder 
  hide details  
Reply
post #4 of 20
Thread Starter 
Yeah after an hour or less of browsing and many tabs later, Firefox goes unresponsive and the entire OS is frozen for periods of many minutes at a time. I really think it is the OS causing this, for I have set Firefox to disable using the disk cache and use memory cache instead (though even with that firefox doesn't break through the amount of RAM needed). When I look at the system monitor (and it can take many minutes for me to be able to open the "system" menu through which I access the system monitor) it shows RAM usage at around 300MB and not going past, while swap usage is moving up and down actively.

I now have terminal open running vmstat and I will be having a good look at the so and si columns. They're currently at 221 and 229 but I'm not getting any thrashing at the moment.
post #5 of 20
221/229 are actually pretty high numbers. On a system with a healthy virtual memory situation, they will be close to zero. How are you measuring memory usage? Use `free -m`, the middle `-/+ buffers/cache:' line is the most important one to look at.
my baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 4.0 EVGA 780i 2x GTS 512 SLi 770/linked/1050 2x 2gb G.Skill PQ DDR2-1000 
Hard DriveOSMonitorKeyboard
2x 250Gb 7200.10 (raid 0) Arch Linux 64 Samsung T240 Saitek eclipse 
PowerCaseMouse
OCZ GameXStream 700 watt Cooler Master 690 Razer Deathadder 
  hide details  
Reply
my baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 4.0 EVGA 780i 2x GTS 512 SLi 770/linked/1050 2x 2gb G.Skill PQ DDR2-1000 
Hard DriveOSMonitorKeyboard
2x 250Gb 7200.10 (raid 0) Arch Linux 64 Samsung T240 Saitek eclipse 
PowerCaseMouse
OCZ GameXStream 700 watt Cooler Master 690 Razer Deathadder 
  hide details  
Reply
post #6 of 20
Dude... old laptop + web browsing only? Why aren't you using an OS for such? That is part of the beauty of Linux, there's an OS out there specifically for your needs. I'm talking about JoliOS (Jolicloud). Plus, even with the GNOME DE instead of Unity, I've found the new Ubuntu to be on the not-as-good-as-previous side of things. GNOME is really also not what I'd recommend, unless your using JoliOS (but thats a different story), I really thin you would benefit from a much lighter DE/WM, such as LXDE, XFCE, Openbox, Blackbox, or the like. The thing sounds like its just working too hard overall, and Lubuntu, or Xubunu (if you need the ubuntu flavor) may be just the thing to solve your woes.
    
CPUMotherboardGraphicsRAM
AVC PENTIUM 4 DUAL CORE HSF Z9H741K011 EVGA 680i SLI 2x NVIDIA GEFORCE 8800GT 512MB PCI-E REV 1 (SLI) 4x WM552/XG691 HYNIX 1GB DDR2 PC2-6400 JEDEC STD 
Hard DriveOptical DriveOSMonitor
2x SEAGATE HDD 250GB SATA 7200RPM 16MB (Raid0) LG 20X DUAL-LAYER DVD RE-WRITER NON-LIG XP-MCE/Mint 11 KDE 50 inch Samsung DLP HDTV 
KeyboardPowerCaseMouse
MS Wireless BT 7000 1 KILOWATT OEM ATX PSU FULL-TOWER BLUE CASE 2.0B MS Wireless Laser BT 8000 
Mouse Pad
Alienware Big Head 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AVC PENTIUM 4 DUAL CORE HSF Z9H741K011 EVGA 680i SLI 2x NVIDIA GEFORCE 8800GT 512MB PCI-E REV 1 (SLI) 4x WM552/XG691 HYNIX 1GB DDR2 PC2-6400 JEDEC STD 
Hard DriveOptical DriveOSMonitor
2x SEAGATE HDD 250GB SATA 7200RPM 16MB (Raid0) LG 20X DUAL-LAYER DVD RE-WRITER NON-LIG XP-MCE/Mint 11 KDE 50 inch Samsung DLP HDTV 
KeyboardPowerCaseMouse
MS Wireless BT 7000 1 KILOWATT OEM ATX PSU FULL-TOWER BLUE CASE 2.0B MS Wireless Laser BT 8000 
Mouse Pad
Alienware Big Head 
  hide details  
Reply
post #7 of 20
Thread Starter 
I took that 221/229 value with firefox open with two tabs and no thrashing occuring.
Ubuntu is what I'm most familiar with but I have been considering a different distro for some time now. There was one other one I heard of (S... something, and it apparently focused on out-of-the-box working status/drivers) that I was interested in. I like having a decent, usable and snappy UI though; compiz apparently runs like a champ on this old Intel GMA graphics chip, so might as well utilize it.
post #8 of 20
Quote:
Originally Posted by StupidMonkey;14300405 
I really think you would benefit from a much lighter DE/WM, such as LXDE, XFCE, Openbox, Blackbox, or the like. The thing sounds like its just working too hard overall, and Lubuntu, or Xubunu (if you need the ubuntu flavor) may be just the thing to solve your woes.
This is probably going to fix your problem. Gnome2, although it isn't necesarily too ram intensive, it will eat around 150-250MB. So first, I would recommend you switch to one of the desktop environments above. XFCE is the most like Gnome, and most people really like it. Openbox is even lighter, but you will have to create your own applications menu, which isn't that hard.

Also, if you want to stay in Gnome, you should look at "System > Preferences > Startup Applications" and check off as many processes as you possibly can.
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
post #9 of 20
Thread Starter 
I'll have a look at switching out of gnome. Thanks.
post #10 of 20
Quote:
Originally Posted by Rothen;14305939 
... Openbox is even lighter, but you will have to create your own applications menu, which isn't that hard. ..
Code:
sudo apt-get install tint2
or
Code:
yum install tint2
then start it in terminal or right click and find it. First time I used Openbox I sat looking at my screen waiting for something to load up other than just my mouse pointer... but really Openbox was done loading. I right clicked just goofing around and figured out I knew nothing. Soon as I saw the menu, from right clicking, I was golden. All you need is terminal and the world is yours!
    
CPUMotherboardGraphicsRAM
AVC PENTIUM 4 DUAL CORE HSF Z9H741K011 EVGA 680i SLI 2x NVIDIA GEFORCE 8800GT 512MB PCI-E REV 1 (SLI) 4x WM552/XG691 HYNIX 1GB DDR2 PC2-6400 JEDEC STD 
Hard DriveOptical DriveOSMonitor
2x SEAGATE HDD 250GB SATA 7200RPM 16MB (Raid0) LG 20X DUAL-LAYER DVD RE-WRITER NON-LIG XP-MCE/Mint 11 KDE 50 inch Samsung DLP HDTV 
KeyboardPowerCaseMouse
MS Wireless BT 7000 1 KILOWATT OEM ATX PSU FULL-TOWER BLUE CASE 2.0B MS Wireless Laser BT 8000 
Mouse Pad
Alienware Big Head 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AVC PENTIUM 4 DUAL CORE HSF Z9H741K011 EVGA 680i SLI 2x NVIDIA GEFORCE 8800GT 512MB PCI-E REV 1 (SLI) 4x WM552/XG691 HYNIX 1GB DDR2 PC2-6400 JEDEC STD 
Hard DriveOptical DriveOSMonitor
2x SEAGATE HDD 250GB SATA 7200RPM 16MB (Raid0) LG 20X DUAL-LAYER DVD RE-WRITER NON-LIG XP-MCE/Mint 11 KDE 50 inch Samsung DLP HDTV 
KeyboardPowerCaseMouse
MS Wireless BT 7000 1 KILOWATT OEM ATX PSU FULL-TOWER BLUE CASE 2.0B MS Wireless Laser BT 8000 
Mouse Pad
Alienware Big Head 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Linux Ubuntu thrashing at just 300MB/512MB RAM usage