vmstat

A

Anonymous

Guest
I ckeck my computer with vmstat -w 5 and I got:

procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
0 16 0 545208 1699008 217 1 2 0 145 0 0 0 151 14146 1050 2 2 96
0 16 0 545208 1699084 67 0 0 0 58 0 1 0 241 24977 1473 2 4 94
0 16 0 545208 1699084 109 0 0 0 90 0 2 0 240 25315 1538 3 5 92
0 16 0 545208 1699084 100 0 0 0 81 0 0 0 229 35186 1349 2 5 93
0 16 0 550080 1697224 117 0 2 0 71 0 9 0 267 26657 1746 10 6 85
0 16 0 567600 1694052 282 0 0 0 150 0 4 0 270 28774 2056 12 7 81
1 16 0 568764 1693692 221 0 0 0 95 0 9 0 241 28139 1481 4 6 90

I have all the time in the Process section "b" number 16. My system is FreeBSD 7.0 on the standalone computer (no server), cable connection to the Internet.

Thanks...
 
SaveTheRbtz said:
what
# top -m io
says?

I open KDE now and vmstat shows the same.
top-m io

last pid: 9069; load averages: 0.18, 0.24, 0.18 up 0+15:34:13 06:20:38
89 processes: 4 running, 85 sleeping
CPU states: 1.5% user, 0.0% nice, 6.0% system, 0.4% interrupt, 92.0% idle
Mem: 199M Active, 735M Inact, 210M Wired, 1780K Cache, 112M Buf, 856M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
8382 ajtim 166 1 0 0 0 0 0.00% Xorg
9036 ajtim 77 11 0 0 0 0 0.00% kdeinit
8569 ajtim 0 0 0 0 0 0 0.00% kdeinit
1042 root 5 2 0 0 0 0 0.00% hald-addon-m
625 root 83 2 0 0 0 0 0.00% moused
1033 haldaemon 7 0 0 0 0 0 0.00% hald
8470 ajtim 35 0 0 0 0 0 0.00% kdeinit
927 clamav 0 0 0 0 0 0 0.00% clamd
8445 ajtim 1 2 0 0 0 0 0.00% kdeinit
1057 root 4 0 0 0 0 0 0.00% hald-addon-s
8439 ajtim 0 0 0 0 0 0 0.00% kdeinit
8465 ajtim 12 0 0 0 0 0 0.00% artsd
8457 ajtim 25 0 0 0 0 0 0.00% kdeinit
8455 ajtim 1 0 0 0 0 0 0.00% kdeinit
8453 ajtim 26 2 0 0 0 0 0.00% kdeinit
1041 root 2 0 0 0 0 0 0.00% hald-addon-s
8610 ajtim 0 0 0 0 0 0 0.00% kdeinit
 
DutchDaemon said:
try
Code:
top -m io -d 1

That'll show you some totals.

last pid: 1303; load averages: 0.52, 0.38, 0.17 up 0+00:03:39 15:28:20
86 processes: 1 running, 85 sleeping
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 149M Active, 73M Inact, 105M Wired, 1560K Cache, 112M Buf, 1673M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
1264 ajtim 5231 3535 216 25 217 458 11.01% kdeinit
1236 ajtim 437 217 56 0 50 106 2.55% kdeinit
1115 ajtim 12438 2487 160 0 1697 1857 44.63% Xorg
1217 ajtim 2494 356 15 0 1 16 0.38% kdeinit
1038 haldaemon 609 470 23 0 19 42 1.01% hald
1196 ajtim 2586 1216 180 0 23 203 4.88% kdeinit
1211 ajtim 4739 341 334 0 125 459 11.03% artsd
1186 ajtim 1566 497 97 0 29 126 3.03% kdeinit
1199 ajtim 1866 595 78 0 31 109 2.62% kdeinit
1160 ajtim 2187 234 5 0 1 6 0.14% gam_server
1194 ajtim 1756 334 21 0 28 49 1.18% kdeinit
1229 ajtim 203 237 46 0 56 102 2.45% korgac
1220 ajtim 298 160 5 0 0 5 0.12% kdeinit
625 root 1920 26 0 0 0 0 0.00% moused
1223 ajtim 226 119 7 0 4 11 0.26% kdeinit
1180 ajtim 1183 691 0 0 0 0 0.00% kdeinit

Thanks...
 
I commented hal and dbus in rc.conf and I have now:

vmstat
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
0 1 0 409440 1733600 330 3 5 0 199 0 0 0 153 2041 1363 2 1 96


and

top -m io -d 1
last pid: 1182; load averages: 0.02, 0.11, 0.07 up 0+00:08:25 15:45:34
60 processes: 1 running, 59 sleeping
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 145M Active, 39M Inact, 128M Wired, 1384K Cache, 109M Buf, 1689M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
1142 ajtim 7102 2708 240 27 218 485 10.89% kdeinit
1030 ajtim 16476 3477 169 0 2105 2274 51.07% Xorg
1118 ajtim 4388 525 15 0 1 16 0.36% kdeinit
1103 ajtim 2574 1343 180 0 23 203 4.56% kdeinit
1112 ajtim 5525 309 337 0 127 464 10.42% artsd
1105 ajtim 2440 740 78 0 31 109 2.45% kdeinit
1093 ajtim 1744 660 98 0 29 127 2.85% kdeinit
1101 ajtim 2751 318 21 0 28 49 1.10% kdeinit
1130 ajtim 1355 205 58 0 50 108 2.43% kdeinit
1070 ajtim 2158 195 22 0 33 55 1.24% gam_server
1129 ajtim 216 408 46 0 56 102 2.29% korgac
625 root 3131 42 0 0 0 0 0.00% moused
1121 ajtim 396 114 5 0 0 5 0.11% kdeinit
1124 ajtim 279 160 6 0 3 9 0.20% kdeinit
1088 ajtim 1274 682 0 0 0 0 0.00% kdeinit
1085 ajtim 158 243 12 0 11 23 0.52% kdeinit
1114 ajtim 458 105 0 0 0 0 0.00% kdeinit
1149 ajtim 333 101 41 0 0 41 0.92% kdeinit
1147 ajtim 448 81 55 0 15 70 1.57% kdeinit
1150 ajtim 358 112 24 0 0 24 0.54% kdeinit
1148 ajtim 229 73 33 8 0 41 0.92% kdeinit
1100 ajtim 241 60 8 0 8 16 0.36% kdeinit
1151 ajtim 165 50 23 0 0 23 0.52% kdeinit
1152 ajtim 152 56 12 0 0 12 0.27% kdeinit
1091 ajtim 254 33 2 0 34 36 0.81% kdeinit
459 _pflogd 947 15 4 0 0 4 0.09% pflogd
1135 root 101 10 3 0 0 3 0.07% csh
1172 ajtim 31 15 4 0 0 4 0.09% kdeinit
1006 ajtim 61 2 28 0 12 40 0.90% tcsh
1132 ajtim 10 10 2 0 0 2 0.04% tcsh
992 root 44 2 22 0 7 29 0.65% login
1143 ajtim 33 4 6 0 0 6 0.13% kdeinit
1146 ajtim 27 0 5 0 0 5 0.11% kdeinit
1144 ajtim 29 4 5 0 0 5 0.11% kdeinit
 
I'm rather surprised by the inordinate amount of IO caused by Xorg (+ 50%). On my laptop, it's about 3%, the busiest process is firefox with 14%.

By the way, system output looks much better with CODE tags around it.
 
DutchDaemon said:
I'm rather surprised by the inordinate amount of IO caused by Xorg (+ 50%). On my laptop, it's about 3%, the busiest process is firefox with 14%.

By the way, system output looks much better with CODE tags around it.

How many process do you have open? What do you think that I have wrong. please?

I tried again with more open app.:

last pid: 1798; load averages: 0.14, 0.21, 0.14 up 0+01:06:50 16:43:59
109 processes: 1 running, 108 sleeping
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 433M Active, 277M Inact, 132M Wired, 15M Cache, 112M Buf, 1144M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
1449 ajtim 147404 46060 13 0 8851 8864 33.67% Xorg
1658 ajtim 26952 10307 287 290 221 798 3.03% amarokapp
1749 ajtim 6268 7422 506 0 797 1303 4.95% soffice.bin
1532 ajtim 20711 1467 1 0 0 1 0.00% kdeinit
1786 ajtim 6237 3900 0 29 2 31 0.12% kdeinit
1520 ajtim 21217 1963 153 0 6 159 0.60% kdeinit
1542 ajtim 8462 2886 13 21 4 38 0.14% kdeinit
1648 ajtim 6360 4728 500 0 237 737 2.80% gimp-2.6
625 root 55583 1065 0 0 0 0 0.00% moused
1601 ajtim 12280 1889 187 0 209 396 1.50% opera
1775 ajtim 3642 2548 301 0 451 752 2.86% smile
1640 ajtim 5962 1235 159 5 596 760 2.89% skype
1516 ajtim 17835 865 2 0 5 7 0.03% kdeinit
1769 ajtim 10350 386 47 0 9 56 0.21% mplayer
1654 ajtim 6270 1397 233 0 6 239 0.91% script-fu
1518 ajtim 9568 1558 1 0 1 2 0.01% kdeinit
1676 ajtim 4082 1863 164 0 25 189 0.72% k3b
1558 ajtim 6347 775 4 0 2 6 0.02% kdeinit
1527 ajtim 13951 419 1 0 2 3 0.01% artsd
1762 ajtim 2767 2377 11 0 24 35 0.13% firefox-bin
1508 ajtim 4808 541 10 4 7 21 0.08% kdeinit
1774 ajtim 297 745 35 0 15 50 0.19% rawstudio
1485 ajtim 2388 149 3 0 0 3 0.01% gam_server
1540 ajtim 400 329 5 0 2 7 0.03% korgac
1534 ajtim 1497 124 0 0 0 0 0.00% kdeinit
1503 ajtim 2215 1424 0 0 0 0 0.00% kdeinit
1647 ajtim 437 53 6 0 31 37 0.14% gqview
1500 ajtim 467 251 2 0 0 2 0.01% kdeinit
1536 ajtim 793 249 0 0 3 3 0.01% kdeinit
1529 ajtim 1292 261 0 0 0 0 0.00% kdeinit
1643 ajtim 5314 22 0 0 0 0 0.00% skype
459 _pflogd 8060 46 4 0 0 4 0.02% pflogd
1790 ajtim 398 119 0 0 0 0 0.00% kdeinit
1793 ajtim 423 157 1 0 0 1 0.00% kdeinit

and vmstat:

vmstat
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy i d
0 4 0 1247620 1192136 196 2 2 0 142 0 0 0 203 4214 2327 6 1
 
I have about 88 processes in top. No process is over 14% of total IO, and I have no blocking processes in vmstat (ever, I think). That doesn't mean I know what's wrong with your setup, but it is clear that something is blocking. I don't use KDE (anymore), but the number of kdeinit processes appears to suggest that a lot of KDE-related stuff is starting up or waiting to start up all the time, disk-bound stuff. Is your disk light burning all the time?
 
Is it possible that is something wrong with permissions, please?
 
Definitely not a permissions a permissions issue on the surface. As a matter of fact I am not certain that I see any issue with your output. The I/O number is a percentage of what is being used. That only shows that 50% of the I/O wait is due to xorg. If you want to lower that percentage remove any debugging or verbose logging that may be enabled. Mine runs at 92% but that is 92% of < 1 so I/O is not high but xorg is responsible for the majority of it. I installed it via a distribution set so it is not optimized or built from source for this machine. That may ultimately be your issue.
 
BuSerD said:
Definitely not a permissions a permissions issue on the surface. As a matter of fact I am not certain that I see any issue with your output. The I/O number is a percentage of what is being used. That only shows that 50% of the I/O wait is due to xorg. If you want to lower that percentage remove any debugging or verbose logging that may be enabled. Mine runs at 92% but that is 92% of < 1 so I/O is not high but xorg is responsible for the majority of it. I installed it via a distribution set so it is not optimized or built from source for this machine. That may ultimately be your issue.

Thank you very much. I don't have a problem with xorg or desktop applications. I like to know why I have:
vmstat:

procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
0 1 0 409440 1733600 330 3 5 0 199 0 0 0 153 2041 1363 2 1 96
 
richardpl said:
Post output or vmstat -i

vmstat -i
interrupt total rate
irq1: atkbd0 4103 0
irq6: fdc0 10 0
irq14: ata0 120668 2
irq15: ata1 90 0
irq16: uhci0 uhci+ 180152 3
irq19: uhci1 23199 0
irq22: emu10kx0+ 4264645 93
irq23: rl0 ehci0 2633 0
cpu0: timer 90835684 2000
cpu1: timer 90827789 1999
Total 186258973 4101
 
lumiwa said:
Thank you very much. I don't have a problem with xorg or desktop applications. I like to know why I have:
vmstat:

procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id
0 1 0 409440 1733600 330 3 5 0 199 0 0 0 153 2041 1363 2 1 96

I see now. Sorry, I lost that during the read. Column b is pre-allocated proc cycles for i/o and other paging needs. I still don't see a problem but what are the specs of your machine? If the machine is older or the processor always shows > 0 in the b column you may want to try the previous suggests or swap to proc if possible just for testing.
 
richardpl said:
Post output of top -SH -m io -d 1

top -SH -m io -d 1
last pid: 30802; load averages: 0.03, 0.04, 0.01 up 0+16:19:21 12:08:05
108 processes: 3 running, 86 sleeping, 19 waiting
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 151M Active, 590M Inact, 210M Wired, 712K Cache, 112M Buf, 1050M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
11 root 1742966 1235578 0 0 0 0 0.00% idle: cpu1
12 root 6390583 12796646 0 0 0 0 0.00% idle: cpu
30736 ajtim 8068 935 0 0 0 0 0.00% kdeinit
30775 ajtim 512 141 1 0 2 3 0.01% kdeinit
13 root 6739347 149589 0 0 0 0 0.00% swi4: clock
30761 ajtim 11248 3490 5 39 2 46 0.14% kdeinit
34 root 5536060 115 0 0 0 0 0.00% irq22: emu1
46 root 58653 1242 0 25463 0 25463 75.20% syncer
48 root 58857 3673 164 36 0 200 0.59% softdepflush
894 clamav 15 476 0 0 0 0 0.00% clamd
30653 ajtim 26093 3965 0 0 2076 2076 6.13% Xorg
4 root 674149 1106 0 0 0 0 0.00% g_down
3 root 705337 303 0 0 0 0 0.00% g_up
622 root 38144 751 0 0 0 0 0.00% moused
2 root 586847 56 0 0 0 0 0.00% g_event
23 root 286852 350 0 0 0 0 0.00% irq16: uhci0
 
BuSerD said:
I see now. Sorry, I lost that during the read. Column b is pre-allocated proc cycles for i/o and other paging needs. I still don't see a problem but what are the specs of your machine? If the machine is older or the processor always shows > 0 in the b column you may want to try the previous suggests or swap to proc if possible just for testing.

Before I commented (disable) hal and dbus in rc.conf I had in the column "b" 16. It is in my first post.
 
One top...more:

top -SH -m io -d 1
last pid: 30849; load averages: 0.15, 0.18, 0.08 up 0+16:29:47 12:18:31
106 processes: 3 running, 84 sleeping, 19 waiting
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 156M Active, 590M Inact, 215M Wired, 692K Cache, 112M Buf, 1041M Free
Swap: 989M Total, 989M Free

PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
11 root 1839550 1330529 0 0 0 0 0.00% idle: cpu1
12 root 7065801 13075845 0 0 0 0 0.00% idle: cpu0
30846 ajtim 5612 2681 0 26 1 27 0.07% kdeinit
13 root 6870774 151703 0 0 0 0 0.00% swi4: clock sio
34 root 5604368 144 0 0 0 0 0.00% irq22: emu10kx0+
46 root 59281 1428 0 27187 0 27187 73.59% syncer
48 root 59490 3791 167 36 0 203 0.55% softdepflush
30653 ajtim 83116 14890 0 0 3436 3436 9.30% Xorg
894 clamav 15 476 0 0 0 0 0.00% clamd
30736 ajtim 20646 1653 0 0 0 0 0.00% kdeinit
622 root 50558 953 0 0 0 0 0.00% moused
4 root 680557 1137 0 0 0 0 0.00% g_down
3 root 713402 335 0 0 0 0 0.00% g_up
30712 ajtim 5187 2646 3 4 3 10 0.03% kdeinit
30731 ajtim 17265 815 0 0 2 2 0.01% artsd
23 root 340178 420 0 0 0 0 0.00% irq16: uhci0 uhci+
2 root 593095 62 0 0 0 0 0.00% g_event
16 root 592382 173 0 0 0 0 0.00% yarrow
30722 ajtim 5262 1778 0 0 1 1 0.00% kdeinit
30724 ajtim 7072 578 0 0 1 1 0.00% kdeinit
35 root 127432 219 0 0 0 0 0.00% irq14: ata0
30720 ajtim 7161 562 0 0 6 6 0.02% kdeinit
30707 ajtim 6901 4605 0 0 0 0 0.00% kdeinit
30775 ajtim 2433 197 2 0 2 4 0.01% kdeinit
456 _pflogd 120421 119 3 0 0 3 0.01% pflogd
27 root 50745 109 0 0 0 0 0.00% irq19: uhci1
30689 ajtim 2378 137 0 0 0 0 0.00% gam_server
924 root 11939 38 0 0 2 2 0.01% sendmail
30765 ajtim 2352 423 0 1 0 1 0.00% kdeinit
30770 ajtim 2298 406 0 9 0 9 0.02% kdeinit
30771 ajtim 2198 399 0 1 0 1 0.00% kdeinit
30772 ajtim 2064 367 0 9 0 9 0.02% kdeinit
30738 ajtim 2133 313 2 0 0 2 0.01% kdeinit
30803 ajtim 1518 276 0 1 0 1 0.00% kdeinit
 
Does same problem happens when not starting Xorg?
Looks like syncer have bunch things to do but your disk is slow. (Give some information about your disks)

Also try to play with:
Code:
     kern.filedelay   30           time to delay syncing files
     kern.dirdelay    29           time to delay syncing directories
     kern.metadelay   28           time to delay syncing metadata

Read syncer(4) for more info.
Also you can add "noatime" flag to some of /etc/fstab entries.
 
richardpl said:
Does same problem happens when not starting Xorg?
Looks like syncer have bunch things to do but your disk is slow. (Give some information about your disks)

Also try to play with:
Code:
     kern.filedelay   30           time to delay syncing files
     kern.dirdelay    29           time to delay syncing directories
     kern.metadelay   28           time to delay syncing metadata

Read syncer(4) for more info.
Also you can add "noatime" flag to some of /etc/fstab entries.

Yes, I have the same problem before start xorg.
My fstab looks like:
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1b none swap sw 0 0
/dev/ad0s1a / ufs rw 1 1
/dev/ad0s1e /tmp ufs rw 2 2
/dev/ad0s1f /usr ufs rw 2 2
/dev/ad0s1d /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/dev/fd0 /floppy msdos rw,noauto 0 0

and:

egrep 'ad[0-9]|cd[0-9]' /var/run/dmesg.boot
ad0: 76319MB <WDC WD800JB-00FSA0 77.07W77> at ata0-master UDMA100
acd0: DVDR <NEC DVD RW ND-1300A/1.06> at ata1-master UDMA33
cd0 at ata1 bus 0 target 0 lun 0
cd0: <_NEC DVD_RW ND-1300A 1.06> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a
ad0: 76319MB <WDC WD800JB-00FSA0 77.07W77> at ata0-master UDMA100
acd0: DVDR <NEC DVD RW ND-1300A/1.06> at ata1-master UDMA33
cd0 at ata1 bus 0 target 0 lun 0
cd0: <_NEC DVD_RW ND-1300A 1.06> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a
 
Doesnt look like disk fault.

Post top and vmstat output from singleuser mode.

It is probably because usb is Giant locked and it is sharing irq resource with ethernet card.

Disable artsd from kde if that doesnt work also disable emu10kx0 driver.

Are you using OSS from ports?
 
Back
Top