Click to See Complete Forum and Search --> : Performance Tweaks
A newbie question for all you Linux gurus. I am running Linux Mandrake 8.0, on a Pentium III 650MHz based machine with 128MB RAM. My question is are there any sites that provide some help on tweaking a Linux box? Everything seems so choppy even when I only have one app running. I ran the "free" command from a terminal window and here are the results...
Mem:
total - 126912
used - 124616
free - 2296
shared - 0
buffers - 7344
cached - 63724
-/+ buffers/cache:
used - 53548
free - 73364
Swap:
total - 249440
used - 0
free - 249440
Does this seem right to you guys? I am apparently using 124MB of RAM! What can be taking up all my memory? If anyone has any suggestions I would appreciate your help.
Thanks.
Malakin
07-29-2001, 04:20 AM
You are probably used to the way windows handles memory. Linux at least the newer kernels handle it very differently. Linux will use a lot of available memory to cache the hard drive freeing it only when it's needed for other things which improves performance. Note the line on your free results "cached - 63724" shows you're using around half your memory for caching. This agressive caching is important for people with larger ammounts of ram since if you have a gig of memory it goes mainly unused in a windows box (even with win2k and the registry tweaks) while in Linux it will use it for caching. Another nice thing about Linux is it won't grind away at your virtual memory file until it really needs it while other os's are causing people to do rediculous things like create ram drives to run their virtual memory off of. Note that your swap file is currently empty
Swap:
total - 249440
used - 0
That's odd that you find things slow, I have several computer here and only one is faster then yours, I find Mandrake 8.0 is pretty good for speed compared to windows. Konqueror is a fast browser. Memory is dirt cheap these days, more wouldn't hurt.
If you want some performance tuning help go to www.google.com (http://www.google.com) and type in "linux performance tuning" with the quotes, and it seems to come up with quite a few quality links.
Some quick ideas - turn off any services which aren't needed, try 16bit desktop color unless you need 24/32 for some reason, turn on dma with hdparm.
You might also want to check out the hard drive speed tweak (http://www.linuxnewbie.org/nhf/intel/hardware/hdtweak.html) NHF, as some of the sluggishness you're experiencing may be related to disk performance, not memory.
I've got 256MB of RAM, but was still feeling like my system was responding pretty slowly. I interrogated my disks with hdparm and found that they were both running at only 16-bit I/O, and DMA was not enabled. Once I followed the tips in the NHF, my disks' transfer rates went from about 4MB/sec to over 20MB/sec, which made for a hugely noticeable performance boost all the way around.
Choozo
07-29-2001, 06:03 AM
You might want to run the 'top' command from a shell, and see which processes are running and the amount of CPU time they use. I've seen something similar as you report when a audioserver of some sort was running high on the CPU (don't remember its name now) - just killed that one to fix it.
Cheers :)
Choozo's idea is a good one to follow up on as well. Run top or ps -aux to see if you have any un-needed processes running/loading at startup. If you do, disable them.
cypunk06
07-29-2001, 11:55 AM
I am a drake 8 user as well, and KDE is bloated, did you load everything? I tried the installing with the fewest apps and that seemed to help. Even though your PC should handle all apps.
Thanks for all the help guys. I think I figured it out. I had the wrong driver loaded for my video card. It was only using 4MB of the 8MB video RAM I have. I also reduced the display to 16bit color from 24bit. That seemed to do the trick. Again thanks a lot guys.
Stanley W. Rogouski
07-30-2001, 01:00 AM
Absolutely right up my alley. I'm having the same issues.
I'm using 7.1 one now as my main desktop OS. I'm reasonably proficient as a user. I built my company's website using Vi and The Gimp. But I'm still a relative novice when it comes to tuning my system.
I reboot. This machine. I guess you have my profile. I let you're scripts scan my hard drive when I registered. I do a vmstat and it's using 128 megs of memory. I've got 256. I fire up KDE, a few browsers, Star Office, XMMS, and a few terminals. I do a vmstat. It's using over 250 megs of memory. It's paging the hard disk. But here's the kicker. I log out of X and go back to init 3. I do a vmstat. I'm still using over 200 megs. It doesn't release most of the memory. I do a bunch of killall -KILLs and I get it down to about 150 megs. But I have to reboot to clear it.
I have another machine running FreeBSD. It has a mere 160 megs of memory and it's always enough. I can fire up Netscape as many times as I want and I can't get it to go over 100 megs.
And I'm using the FreeBSD box as a webserver and the Redhat box only as a worksation. I've got MySQL, Apache, Sendmail, lots of stuff running on the FreeBSD box.
I think KDE's just a pig. I've tried Helix Gnome and I don't like it. Reminds me of Windows. Slow. Not that stable. I like KDE. I have no need for Windows but God. 256 Megs is plenty for even Windos 2000 Advanced Server, which I've run on this machine with no problems. Is there something I can do to trim this thing down or should I just go out and spend $75 for another 256 megs of Ram. That's not a problem but it seems to me that if 256 megs of Ram isn't enough for a basic workstation I must be doing something wrong.
Go easy on me. I'm still an MCSE.
Stanley W. Rogouski
07-30-2001, 01:05 AM
Here's what I'm buring:
total used free shared buffers cached
Mem: 255576 253508 2068 0 2888 100720
-/+ buffers/cache: 149900 105676
Swap: 530104 0 530104
And here's what I'm running (lotta stuff I guess):
PID TTY STAT TIME COMMAND
1 ? S 0:04 init [3]
2 ? SW 0:00 [keventd]
3 ? SW 0:00 [kapm-idled]
4 ? SW 0:00 [kswapd]
5 ? SW 0:00 [kreclaimd]
6 ? SW 0:00 [bdflush]
7 ? SW 0:00 [kupdated]
8 ? SW< 0:00 [mdrecoveryd]
73 ? SW 0:00 [khubd]
463 ? S 0:00 syslogd -m 0
468 ? S 0:00 klogd -2
482 ? S 0:00 portmap
497 ? S 0:00 rpc.statd
581 ? S 0:00 /usr/sbin/apmd -p 10 -w 5 -W -P /etc/sysconfig/apm-sc
630 ? S 0:00 /usr/sbin/automount --timeout 60 /misc file /etc/auto
642 ? S 0:00 /usr/sbin/atd
692 ? S 0:00 sendmail: accepting connections
705 ? S 0:00 gpm -t ps/2 -m /dev/mouse
717 ? S 0:00 crond
753 ? S 0:03 xfs -droppriv -daemon
778 tty1 S 0:00 login -- stan
779 tty2 S 0:00 /sbin/mingetty tty2
780 tty3 S 0:00 /sbin/mingetty tty3
781 tty4 S 0:00 /sbin/mingetty tty4
782 tty5 S 0:00 /sbin/mingetty tty5
783 tty6 S 0:00 /sbin/mingetty tty6
804 tty1 S 0:00 -bash
1156 tty1 S 0:00 /bin/sh /usr/X11R6/bin/startx
1161 tty1 S 0:00 xinit /etc/X11/xinit/xinitrc -- -auth /home/stan/.Xau
1162 ? SL 5:03 /etc/X11/X :0 -auth /home/stan/.Xauthority
1165 tty1 S 0:00 ksmserver --restore
1215 ? S 0:02 kdeinit: dcopserver --nosid
1217 ? S 0:00 kdeinit: klauncher
1219 ? S 0:00 kdeinit: kded
1222 ? S 0:48 artsd -F 10 -S 4096
1225 ? S 0:00 kdeinit: kxmlrpcd
1231 ? S 0:00 kdeinit: Running...
1236 tty1 S 0:00 knotify
1237 ? S 0:09 kdeinit: kwin
1239 ? S 0:04 kdeinit: kdesktop
1241 ? S 0:18 kdeinit: kicker
1247 ? S 0:25 /usr/bin/autorun -l --interval=1000 --cdplayer=/usr/b
1251 ? S 0:00 kdeinit: klipper -icon klipper -miniicon klipper
1253 ? S 0:00 kdeinit: khotkeys
1255 ? S 0:00 kdeinit: kwrited
1256 pts/0 S 0:00 /bin/cat
1259 ? S 1:30 kdeinit: konqueror --silent
1266 ? S 0:01 kdeinit: kcookiejar
1268 ? S 0:00 kdesud
1274 ? S 0:01 xmms
1275 ? S 0:00 xmms
1276 ? S 0:00 xmms
1277 ? S 0:00 xmms
1280 ? S 0:00 kdeinit: konsole -icon konsole -miniicon konsole -cap
1281 pts/1 S 0:00 /bin/bash
1302 ? S 2:15 /usr/lib/mozilla/mozilla-bin
1307 ? S 0:00 /usr/lib/mozilla/mozilla-bin
1308 ? S 0:00 /usr/lib/mozilla/mozilla-bin
1309 ? S 0:00 /usr/lib/mozilla/mozilla-bin
1316 ? S 4:53 kdeinit: konqueror --silent
1345 ? S 0:06 kdeinit: kio_uiserver
1501 ? S 0:00 kdeinit: konsole -icon konsole -miniicon konsole -cap
1502 pts/2 S 0:00 /bin/bash
1522 pts/2 S 0:00 su
1526 pts/2 S 0:00 bash
1577 ? S 0:00 rhnsd --interval 120
1605 ? S 0:05 kdeinit: konqueror --silent
1606 ? S 0:00 kdeinit: kio_file file /tmp/ksocket-stan/klauncherPfM
1607 ? S 0:00 kdeinit: kio_file file /tmp/ksocket-stan/klauncherPfM
1608 ? S 0:00 kdeinit: kio_file file /tmp/ksocket-stan/klauncherPfM
1609 ? S 0:00 kdeinit: kio_file file /tmp/ksocket-stan/klauncherPfM
1610 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-stan/klauncherPfM
1612 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-stan/klauncherPfM
1613 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-stan/klauncherPfM
1614 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-stan/klauncherPfM
1630 ? S 2:11 /usr/bin/nspluginviewer -dcopid nspluginviewer-1605
1633 ? S 0:59 /usr/lib/netscape/netscape-communicator -irix-session
1658 ? S 0:00 (dns helper)
1717 ? S 0:00 kdeinit: konsole -icon konsole -miniicon konsole -cap
1718 pts/3 S 0:00 /bin/bash
1785 ? S 0:00 kdeinit: konsole -icon konsole -miniicon konsole -cap
1786 pts/4 S 0:00 /bin/bash
1806 pts/4 S 0:00 su
1810 pts/4 S 0:00 bash
1829 pts/4 R 0:00 ps ax