You are not logged in.

#1 2004-06-29 04:14:09

nkw
Member
Registered: 2004-03-26
Posts: 80

Slow, what's wa CPU time?

My archLinux sometime is slow when run a few application at the same time.
The following is the top command output: Looks a lot of time is "wa" (IO Wait?) time. And the hard disk seems very busy. How to improve ArchLinux to make it faster? that is, less "wa" time?

Tasks: 132 total,   2 running, 128 sleeping,   0 stopped,   2 zombie
Cpu(s):  7.5% us,  6.2% sy,  0.0% ni,  0.0% id, 85.6% wa,  0.7% hi,  0.0% si
Mem:    383940k total,   381340k used,     2600k free,   102804k buffers
Swap:   385520k total,   302688k used,    82832k free,    32372k cached

Offline

#2 2004-06-29 05:25:30

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: Slow, what's wa CPU time?

do you use tmpfs? for /tmp
try to disable tmpfs and use normal /tmp instead
your swap is heavily used
thats quite strange you have 400MB RAM
what kernel you use?

Offline

#3 2004-06-29 10:54:48

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: Slow, what's wa CPU time?

Take a look at hdparm.

Run a few benchmarks prior to making any adjustments.

for i in 1 2 3 4 5
do
  hdparm -tT /dev/discs/disc0/disc
done

After that, fiddle around with the options.  Make sure to read the man page because some of the options can be err... umm... dangerous.  I've added the following to my /etc/rc.local

hdparm -d1 -A1 -m16 -u1 -a64 /dev/discs/disc0/disc

After you set some options, run the benchmark loop again and see if the times have been reduced.  It might help your overall performance.

HTH,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#4 2004-06-29 14:39:36

nkw
Member
Registered: 2004-03-26
Posts: 80

Re: Slow, what's wa CPU time?

tpowa wrote:

do you use tmpfs? for /tmp
try to disable tmpfs and use normal /tmp instead
your swap is heavily used
thats quite strange you have 400MB RAM
what kernel you use?

I have 384MB RAM. The kernel is Linux myhost 2.6.7 #1 SMP Wed Jun 16 07:04:51 PDT 2004 i686 unknown unknown GNU/Linux
my /ets/fstab: (am i using tmpfs or /tmp?)

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /proc         proc      defaults            0      0
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0
tmpfs                  /tmp          tmpfs     defaults            0      0
sysfs                  /sys          sysfs     defaults            0      0
usbdevfs               /proc/bus/usb usbdevfs  defaults            0      0

/dev/cdroms/cdrom0     /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
/dev/cdroms/cdrom0     /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/floppy/0          /mnt/fl   vfat      user,noauto,unhide      0      0

/dev/discs/disc0/part5 swap swap defaults 0 0
/dev/discs/disc0/part3 / reiserfs defaults 0 0

My hard disk bench test is listed as following. I have an old computer (PII 350, Dell XPS 350 with 15G harddisk, Intel BX chipset motherboard). Is the performance good enough? Or I still need to adjust it?

[root@myhost etc]# for i in 1 2 3 4 5; do   hdparm -tT /dev/discs/disc0/disc; done

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   416 MB in  2.02 seconds = 206.28 MB/sec
 Timing buffered disk reads:   38 MB in  3.16 seconds =  12.02 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   416 MB in  2.02 seconds = 206.28 MB/sec
 Timing buffered disk reads:   38 MB in  3.09 seconds =  12.30 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   416 MB in  2.02 seconds = 205.97 MB/sec
 Timing buffered disk reads:   38 MB in  3.09 seconds =  12.29 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   412 MB in  2.00 seconds = 205.83 MB/sec
 Timing buffered disk reads:   38 MB in  3.13 seconds =  12.15 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   416 MB in  2.02 seconds = 206.28 MB/sec
 Timing buffered disk reads:   38 MB in  3.12 seconds =  12.19 MB/sec

Offline

#5 2004-06-29 15:01:47

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: Slow, what's wa CPU time?

I've got a newer system, but after tweaking my drive with hdparm (as I listed above), here's what I get:

[root@root root]# for i in 1 2 3 4 5; do hdparm -tT /dev/discs/disc0/disc; done

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   3396 MB in  2.00 seconds = 1697.41 MB/sec
 Timing buffered disk reads:  114 MB in  3.01 seconds =  37.89 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   3496 MB in  2.00 seconds = 1748.27 MB/sec
 Timing buffered disk reads:  110 MB in  3.07 seconds =  35.80 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   3536 MB in  2.00 seconds = 1768.27 MB/sec
 Timing buffered disk reads:  114 MB in  3.02 seconds =  37.74 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   3564 MB in  2.00 seconds = 1782.27 MB/sec
 Timing buffered disk reads:  116 MB in  3.04 seconds =  38.11 MB/sec

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   3496 MB in  2.00 seconds = 1747.39 MB/sec
 Timing buffered disk reads:  114 MB in  3.00 seconds =  37.96 MB/sec

Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#6 2004-06-29 16:45:51

afu
Member
From: Tuscalooser, Alabummer
Registered: 2004-02-19
Posts: 155

Re: Slow, what's wa CPU time?

It might help to see what processes are running and turn them off if you don't need them. You show 132 processes, I almost never get 85/90 even with X running.  Just depends on what you need, but turning things off might help security as well as performance.
-Shawn

Offline

#7 2004-06-29 16:50:53

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: Slow, what's wa CPU time?

you use tmpfs
tmpfs                  /tmp          tmpfs     defaults            0      0
this means half of your memory is for the tmp files and it increases if you need more and then swap (eg. you burn a cd or something else wich needs much tmp)
it gets in trouble when you ran out of ram and swap
try to disable this line or change your tmp directories in your programs

Offline

#8 2004-06-29 18:04:44

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Slow, what's wa CPU time?

farphel: how did you get this ?

 Timing buffer-cache reads:   3396 MB in  2.00 seconds = 1697.41 MB/sec

Exactly what kind of drive do you have? :-) On my system it seems that almost all the settings where already turned on and it didn't make any difference with your settings. Strange thing is that hdparm manual suggests setting -a to lower not higher values for a better performance. Most times I get these results

/dev/discs/disc0/disc:
 Timing buffer-cache reads:   376 MB in  2.01 seconds = 187.09 MB/sec
 Timing buffered disk reads:   84 MB in  3.02 seconds =  27.80 MB/sec

and I think it is quite typical for a 80gb ATA100 harddrive with 8mb cache and 7200 rpm or maybe I'm wrong?

Offline

#9 2004-06-29 19:51:07

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: Slow, what's wa CPU time?

@farphell
respect for your benchmark but i can't reproduce that

yeah got that:
normal 60gb ATA 100 7200 RPM and 8MB Cache
/dev/discs/disc0/disc:
Timing buffer-cache reads:   1048 MB in  2.00 seconds = 523.29 MB/sec
Timing buffered disk reads:  110 MB in  3.03 seconds =  36.33 MB/sec

@nkw
you have a lot of processes running
and 2 zombies
thats not really as it should be  :evil:

Offline

#10 2004-06-29 21:17:40

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Slow, what's wa CPU time?

I made another test on a differrent machine with faster processor, newer mainboard, more RAM and almost nothing running in the background. The disk is 60MB ATA100 7200 rpm 2MB cache - but this one is the only device on the ide0 controller (other harddisks on the same cable and especially cdroms/dvds can influence the primary disk performance):

 hdparm -tT /dev/discs/disc0/disc 
/dev/discs/disc0/disc:
 Timing buffer-cache reads:   1464 MB in  2.00 seconds = 731.38 MB/sec
 Timing buffered disk reads:   98 MB in  3.02 seconds =  32.41 MB/sec

This one looks better but still it's far from farphel results :-) (at least in buffer-cache reads). I don't think I could improve it much with hdparm. And about 30MB/sec for timing buffered disk reads is a typical (good) result for normal ata disks IMO. More performance improvement should then come from filesystem type (I use mainly reiserfs).

EDIT: nkw: you really need to check your processes. Try using

ps fax

to track where they come from. You can also try lsof package for tracking open files.

Offline

#11 2004-06-29 21:39:10

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: Slow, what's wa CPU time?

Hmmm... I ran the same benchmark on my home system (results below) and it has the same type of hard drive (don't recall, but nothing special).  My system at work has a newer mobo, P4-HT 2.8GHz whereas my home system has an AMD XP 1600+.

Could it be that HT/SMP is elevating the stats?  I'm not much of a hardware guy.

Home system:

[root@blade root]# for i in 1 2 3; do hdparm -tT /dev/discs/disc1/disc ;done

/dev/discs/disc1/disc:
 Timing buffer-cache reads:   816 MB in  2.00 seconds = 407.86 MB/sec
 Timing buffered disk reads:  138 MB in  3.01 seconds =  45.82 MB/sec

/dev/discs/disc1/disc:
 Timing buffer-cache reads:   812 MB in  2.00 seconds = 405.86 MB/sec
 Timing buffered disk reads:  116 MB in  3.02 seconds =  38.42 MB/sec

/dev/discs/disc1/disc:
 Timing buffer-cache reads:   820 MB in  2.01 seconds = 408.63 MB/sec
 Timing buffered disk reads:   76 MB in  3.04 seconds =  24.99 MB/sec

Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#12 2004-06-30 00:52:28

fbidwell
Member
From: Atlanta, GA (USA)
Registered: 2004-05-09
Posts: 32

Re: Slow, what's wa CPU time?

/dev/discs/disc1/disc:
Timing buffer-cache reads:   2640 MB in  2.00 seconds = 1318.88 MB/sec
Timing buffered disk reads:  132 MB in  3.00 seconds =  43.99 MB/sec


This is what I get at home.  I have a P IV 2.53 mhz.

Looks like the processor speed is producing the high numbers.

Offline

#13 2004-06-30 10:47:36

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Slow, what's wa CPU time?

If this is about processor speed then other things can influence the statitics like cache in the processor (you were using PIVs and I was using only celeron processors), DDR vs SDRAM, various BIOS speed settings etc. etc. First statistic is a memory to memory read so this is normal that it will vary a lot. Second one is more physical and more comparable I think. Some people also say that with SATA drives and kernel 2.6.7 it may really be a big difference in the results:  http://groups.google.com/groups?q=hdpar … it&rnum=12

Offline

Board footer

Powered by FluxBB