Re: pipe Memeroy management Kernel 2.6
- From: UseNet-Posting-Nospam-74308-@xxxxxxxxxxxxxxxxx (Rainer Zocholl)
- Date: 01 Jan 2008 23:48:00 +0100
(Alexander Bartolich) 01.01.08 in /de/comp/os/unix/shell:
Rainer Zocholl schrieb:
[...]
(Stefan Reuther) 01.01.08 in /de/comp/os/unix/shell:
Ich habe doch im Kern ein "resourcen (konflikt) manament.
Ich hoffte, dasder Kern merkt: "Ey der Process 5436 bruacht 99,9%
der IO resourcen während da ne menge anderer Process leer ausgehen,
die auch gerne IO hätten".
Schon mal mit "ionice" dein Glück probiert?
Nein ;-)
Klingt aber verdammt gut!
ionice - get/set program io scheduling class and priority
aba:
# ionice
-su: ionice: command not found
# aptitude search ionice
#
Wo steckt das drin?
schedutils !
argl...naja, wenn man weiss wo es ist, ist es auch logisch da nachzusehen ;-)
Idle. A program running with idle io priority will only get disk time when
no other program has asked for disk io for a defined grace period. The
impact of idle io processes on normal system activity should be zero.
This scheduling class does not take a priority argument.
Da ist vmtl. zu weich, aber mal sehen...
nu frist er (zu anfang) die CPU auf ;-)
also "nice ionice -c3 <cmd>"
Linux supports io scheduling priorities and classes since 2.6.13
with the CFQ io scheduler.
Aha, sehr interssant...
top - 23:08:56 up 5 days, 18 min, 1 user, load average: 3.11, 2.74, 1.57
Tasks: 145 total, 1 running, 143 sleeping, 0 stopped, 1 zombie
Cpu(s): 1.6%us, 13.7%sy, 0.0%ni, 0.0%id, 83.1%wa, 0.0%hi, 1.6%si,
0.0%st
Mem: 383752k total, 378412k used, 5340k free, 508k buffers
Swap: 1815328k total, 321412k used, 1493916k free, 7964k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
159 root 15 -5 0 0 0 S 12.6 0.0 35:35.16 kswapd0
22536 root 20 0 344m 327m 1336 D 0.6 87.4 3:19.72 analyse
25497 root 20 0 2220 1100 800 R 0.6 0.3 0:00.43 top
3131 root 20 0 7244 1624 1228 S 0.3 0.4 0:16.81 apache-ssl
25511 smokepin 20 0 2648 1028 904 S 0.3 0.3 0:00.05 fping
27812 list 20 0 10288 1640 1216 S 0.3 0.4 0:18.34 python
27816 list 20 0 8544 1572 1196 S 0.3 0.4 0:16.52 python
Es scheint sich nicht hochzu schaukeln wie sonst sondern
"swingt" nur vor sich hin. Die Kiste ist natürlich schnarlangsam,
wenn sie an dem script "keult".
Hey klasse.
Wenn ein andere Process ran will, dann fällt das IOwait fast wieder auf Null!
Und sobald das analyse läuft geht's wieder auf 95%wa, klaro, wenn der
speicher nicht reicht...ist das ja OK, sonlange die Kiste (leidlich)
bedienbar bleibt...naja, der Webserver meldet sich jetzt auch erst nach
8sec, aber die Load wächst nicht mehr 2..3stellig sondern bleibt unter 3!
(2 ist ja "normal" dank md und RAID)
top - 23:15:58 up 5 days, 25 min, 1 user, load average: 1.84, 2.77, 2.11
Tasks: 142 total, 2 running, 139 sleeping, 0 stopped, 1 zombie
Cpu(s): 3.0%us, 2.3%sy, 0.0%ni, 0.0%id, 93.4%wa, 0.0%hi, 1.3%si,
0.0%st
Mem: 383752k total, 379448k used, 4304k free, 1880k buffers
Swap: 1815328k total, 572792k used, 1242536k free, 16236k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22536 root 20 0 389m 223m 1316 R 4.3 59.7 3:28.64 analyse
2594 mysql 20 0 126m 3852 1760 S 0.7 1.0 12:55.74 mysqld
26220 root 20 0 2220 1164 852 R 0.7 0.3 0:01.85 top
159 root 15 -5 0 0 0 D 0.3 0.0 35:37.74 kswapd0
3155 root 20 0 3076 808 648 S 0.3 0.2 42:15.47 collectd
Mift, das Logfile ist z.Zt. nur 350MB gross, aber es geht doch sichtbar
in den swap!
top - 23:24:15 up 5 days, 33 min, 1 user, load average: 2.45, 3.07, 2.52
Tasks: 142 total, 2 running, 139 sleeping, 0 stopped, 1 zombie
Cpu(s): 1.3%us, 3.0%sy, 0.0%ni, 0.0%id, 94.0%wa, 0.0%hi, 1.7%si,
0.0%st
Mem: 383752k total, 379052k used, 4700k free, 5264k buffers
Swap: 1815328k total, 641828k used, 1173500k free, 80772k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22536 root 20 0 421m 119m 1312 R 2.3 31.9 3:35.91 analyse
159 root 15 -5 0 0 0 S 0.3 0.0 35:42.07 kswapd0
2909 proftpd 20 0 9972 420 328 S 0.3 0.1 0:25.90 proftpd
28922 root 20 0 2220 1152 852 R 0.3 0.3 0:00.46 top
1 root 20 0 1936 280 256 S 0.0 0.1 0:11.02 init
So dem spamd auch noch angepasst...
[23:31:05]yoda:~# ps -auxwww | grep spamd
root 3365 1.0 0.4 45444 1904 ? S 21:12 1:26 spamd child
root 4773 0.0 0.5 40720 2100 ? Ss 2007 1:32
/usr/sbin/spamd --create-prefs --max-children 5 --helper-home-dir -s local4
-d --pidfile=/var/run/spamd.pid
root 5415 0.3 0.5 46496 2136 ? S 11:20 2:23 spamd
# ionice -p 4773
none: prio 0
# ionice -c3 -p 4773
# ionice -p 5415
none: prio 0
# ionice -c3 -p 5415
# ionice -c3 -p 3365
uups, aufeinmal fühlt sich das system fast "frei"...hoffentlich kommen
jetzt noch die emaildurch den spamd durch ;-)
Ein beispiel was passiert wenn mal inicht geionicete(tm) processe rennen:
top - 23:41:39 up 5 days, 51 min, 2 users, load average: 3.46, 3.02, 2.92
Tasks: 157 total, 2 running, 154 sleeping, 0 stopped, 1 zombie
Cpu(s): 66.2%us, 18.9%sy, 0.0%ni, 0.0%id, 13.9%wa, 0.0%hi, 1.0%si, 0.0%st
Mem: 383752k total, 371396k used, 12356k free, 1348k buffers
Swap: 1815328k total, 699392k used, 1115936k free, 31944k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31859 rrd 20 0 6672 2564 1472 R 1.3 0.7 0:00.04 rrdtool
22536 root 20 0 480m 275m 1312 D 1.0 73.6 3:52.22 analyse
31771 root 20 0 2220 1164 852 R 1.0 0.3 0:00.06 top
3155 root 20 0 3076 808 648 S 0.7 0.2 42:23.91 collectd
30877 rrd 20 0 3540 2020 1372 S 0.7 0.5 0:00.24 collectd2html.p
33 root 15 -5 0 0 0 S 0.3 0.0 7:57.62 kblockd/0
5415 root 20 0 46496 3688 1560 D 0.3 1.0 2:23.98 spamd
Das scheint geholfen zu haben, Thanks!
.
- References:
- Re: pipe Memeroy management Kernel 2.6
- From: Rainer Zocholl
- Re: pipe Memeroy management Kernel 2.6
- From: Alexander Bartolich
- Re: pipe Memeroy management Kernel 2.6
- From: Rainer Zocholl
- Re: pipe Memeroy management Kernel 2.6
- From: Stefan Reuther
- Re: pipe Memeroy management Kernel 2.6
- From: Rainer Zocholl
- Re: pipe Memeroy management Kernel 2.6
- Prev by Date: Re: pipe Memeroy management Kernel 2.6
- Next by Date: Re: pipe Memeroy management Kernel 2.6
- Previous by thread: Re: pipe Memeroy management Kernel 2.6
- Next by thread: Re: pipe Memeroy management Kernel 2.6
- Index(es):
Relevant Pages
|