[MLton] Paging under RedHat 9.0 although largely fitting in core
Alain Deutsch
deutsch@PolySpace.com
Tue, 09 Mar 2004 10:56:10 +0100
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<small><tt>We have noticed the following performance problem under
RedHat 9.0: there are situations where paging seemingly occurs under
RedHat 9.0 although the MLton-generated executable completely resides
in core. In the following instance, I have set ramslop to a low 0.75,
and despite this and the fact that memory is largely unoccupied, the %
of CPU use is closer to 50% than to 90%, as I would expect.<br>
<br>
Enclosed is a top snapshot: we can see that:<br>
</tt></small>
<ol>
<li><small><tt>the MLton-generated executable, iabc-c2if.*, only uses
44% of the CPU</tt></small></li>
<li><tt>its size, 762Mb, is much less than the total RAM size (1Gb)</tt></li>
<li><tt>the core is largely free besides the </tt><small><tt>MLton-generated
executable</tt></small></li>
<li><tt>kswapd is active and eats up 25% of CPU time<br>
</tt></li>
</ol>
I was wondering:<br>
<ol>
<li>if this is due to RedHat 9.0</li>
<li>if so, whether the use of madvise() calls from the gc could ease
up the situation (perhaps by using WONTNEED on old from spaces ?)</li>
<li>if there may be RedHat 9.0 kernel and/or swapd setting to avoid
this behavior.</li>
</ol>
Thanks.<br>
<small><tt><br>
10:43:30 up 18 days, 20:42, 2 users, load average: 2.27, 2.14, 1.89<br>
53 processes: 49 sleeping, 4 running, 0 zombie, 0 stopped<br>
CPU states: 23.2% user 75.6% system 0.0% nice 0.0% iowait 1.0%
idle<br>
Mem: 1030404k av, 1020248k used, 10156k free, 0k shrd,
5288k buff<br>
850308k actv, 50612k in_d, 20932k in_c<br>
Swap: 3849912k av, 694424k used, 3155488k free
168992k cached<br>
<br>
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
COMMAND<br>
881 deutsch 18 0 762M 751M 1404 R 44.8 74.6 15:18 0
iabc-c2if.cx86-<br>
5 root 16 0 0 0 0 RW 25.9 0.0 52:12 0 kswapd<br>
1019 deutsch 16 0 1252 1252 928 R 6.4 0.1 0:06 0 top<br>
15 root 16 0 0 0 0 DW 6.3 0.0 4:31 0
kjournald<br>
32173 deutsch 15 0 528 232 124 S 1.4 0.0 0:02 0 sshd<br>
966 deutsch 15 0 1880 1712 1484 S 1.0 0.1 0:00 0 sshd<br>
1027 deutsch 16 0 560 560 476 S 0.5 0.0 0:00 0 tail<br>
2 root 15 0 0 0 0 RW 0.1 0.0 0:11 0
keventd<br>
1 root 15 0 88 60 40 S 0.0 0.0 0:06 0 init<br>
3 root 15 0 0 0 0 SW 0.0 0.0 0:01 0 kapmd<br>
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0
ksoftirqd_CPU0<br>
9 root 15 0 0 0 0 SW 0.0 0.0 0:00 0
bdflush<br>
6 root 15 0 0 0 0 SW 0.0 0.0 0:03 0
kscand/DMA<br>
7 root 16 0 0 0 0 SW 0.0 0.0 55:11 0
kscand/Normal<br>
8 root 15 0 0 0 0 SW 0.0 0.0 5:32 0
kscand/HighMem<br>
10 root 15 0 0 0 0 SW 0.0 0.0 0:02 0
kupdated<br>
11 root 25 0 0 0 0 SW 0.0 0.0 0:00 0
mdrecoveryd<br>
72 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd<br>
3690 root 15 0 212 164 112 S 0.0 0.0 0:03 0
syslogd<br>
3695 root 15 0 52 4 0 S 0.0 0.0 0:00 0 klogd<br>
3721 daemon 15 0 272 248 184 S 0.0 0.0 0:36 0
portmap<br>
3799 root 15 0 0 0 0 SW 0.0 0.0 0:17 0 rpciod<br>
3800 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 lockd<br>
3812 root 24 0 52 4 0 S 0.0 0.0 0:00 0 apmd<br>
3828 root 25 0 304 260 188 S 0.0 0.0 0:02 0 ypbind<br>
3910 root 15 0 280 216 196 S 0.0 0.0 0:00 0
automount<br>
3912 root 15 0 112 48 28 S 0.0 0.0 0:00 0
automount<br>
3928 root 15 0 352 112 108 S 0.0 0.0 0:14 0 sshd<br>
3942 root 24 0 128 4 0 S 0.0 0.0 0:00 0 xinetd<br>
3981 root 16 0 13064 4 0 S 0.0 0.0 0:00 0 spamd<br>
3990 root 15 0 48 4 0 S 0.0 0.0 0:00 0 gpm<br>
4000 bin 15 0 460 40 12 S 0.0 0.0 0:00 0
cannaserver<br>
4011 root 15 0 176 132 88 S 0.0 0.0 0:03 0 crond<br>
4022 root 15 0 1748 260 224 S 0.0 0.0 0:07 0 cupsd<br>
4067 root 25 0 3356 4 0 S 0.0 0.0 0:00 0
jserver<br>
4144 xfs 15 0 4048 44 24 S 0.0 0.0 0:00 0 xfs<br>
4179 root 23 0 48 4 0 S 0.0 0.0 0:00 0
mingetty<br>
4180 root 23 0 44 4 0 S 0.0 0.0 0:00 0
mingetty<br>
4181 root 23 0 44 4 0 S 0.0 0.0 0:00 0
mingetty<br>
4182 root 23 0 44 4 0 S 0.0 0.0 0:00 0
mingetty<br>
4183 root 20 0 44 4 0 S 0.0 0.0 0:00 0
mingetty<br>
4184 root 20 0 44 4 0 S 0.0 0.0 0:00 0
mingetty<br>
32171 root 21 0 364 0 0 SW 0.0 0.0 0:00 0 sshd<br>
32174 deutsch 15 0 788 640 432 S 0.0 0.0 0:00 0 bash<br>
447 deutsch 15 0 60 8 0 S 0.0 0.0 0:00 0
rte-kernel.x86-<br>
474 deutsch 15 0 260 8 0 S 0.0 0.0 0:00 0
rte-kernel2<br>
548 deutsch 15 0 76 60 28 S 0.0 0.0 0:00 0 tee<br>
783 deutsch 15 0 132 4 0 S 0.0 0.0 0:00 0
rte-suif<br>
877 deutsch 15 0 44 4 0 S 0.0 0.0 0:00 0
rte-time.x86-li<br>
964 root 20 0 1640 1432 1276 S 0.0 0.1 0:00 0 sshd<br>
967 deutsch 16 0 1516 1472 1180 S 0.0 0.1 0:00 0 bash</tt></small><br>
<br>
<pre class="moz-signature" cols="72">--
Alain Deutsch, CTO
PolySpace Technologies
<a class="moz-txt-link-freetext" href="mailto:deutsch@POLYSPACE.COM">mailto:deutsch@POLYSPACE.COM</a> <a class="moz-txt-link-freetext" href="http://www.polyspace.com">http://www.polyspace.com</a>
</pre>
</body>
</html>