[WBEL-users] Memory issues - Machine goes into a swapping tailspin due to tooaggressive cacheing algorithm ?

Gary Mansell Gary.Mansell@ricardo.com
Tue, 16 Mar 2004 16:25:21 +0000


This is a multi-part message in MIME format.

--=-KzyGIRvzo+Zjrnf9bIvS
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Dear all,

I have been using WBEL3.0 happily in a server environment for a while
now and I am now trying to use it on some desktops instead of RH9.0.

I seem to be bumping into a problem with WBEL being too aggressive with
it's cacheing. It would appear to cache data at the expense of making
applications use swap because there is no free memory. I only see this
problem on WBEL3.0 and not RH9.0.

I have applied the following kernel tweaks into /etc/sysctl.conf but
they do not seem to have fixed the problem:

#
# Fix for too aggressive file cacheing
#
vm.pagecache =3D 2 10 20
vm.inactive_clean_percent =3D 100


My application gets stuck into a swap frenzy and the machine grinds to a
halt.

Here is the output from cat /proc/meminfo:

[grma@shane 59] ~ > cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  525836288 445038592 80797696        0 31404032 187092992
Swap: 2146787328 30904320 2115883008
MemTotal:       513512 kB
MemFree:         78904 kB
MemShared:           0 kB
Buffers:         30668 kB
Cached:         181156 kB
SwapCached:       1552 kB
Active:         347540 kB
ActiveAnon:     204324 kB
ActiveCache:    143216 kB
Inact_dirty:     32452 kB
Inact_laundry:   27108 kB
Inact_clean:      5700 kB
Inact_target:    82560 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       513512 kB
LowFree:         78904 kB
SwapTotal:     2096472 kB
SwapFree:      2066292 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB


My understanding of the "vm.pagecache =3D 2 10 20" tweak is that a =
maximum
of 20% of system memory should be used as file cache. Why is it then
that meminfo shows far more than this?

Is there anything that I can do to improve the performance of my apps?

Any help gratefully received.

Regards

--=20

Gary Mansell
Technical Computing Team Leader
IT Department
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ricardo Consulting Engineers Ltd.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - -
This e-mail and any files transmitted with it are confidential and =
intended solely for the use of the individual or entity to whom they are =
addressed. If you have received this e-mail in error please notify the =
sender immediately and delete this e-mail from your system. Please note =
that any views or opinions presented in this e-mail are solely those of =
the author and do not necessarily represent those of Ricardo (save for =
reports and other documentation formally approved and signed for release =
to the intended recipient). Only Directors or Duly Authorised Officers =
are authorised to enter into legally binding obligations on behalf of =
Ricardo unless the obligation is contained within a Ricardo Purchase =
Order. Ricardo may monitor outgoing and incoming e-mails and other =
telecommunications on its e-mail and telecommunications systems. By =
replying to this e-mail you give consent to such monitoring. The =
recipient should check this e-mail and any attachments for the presence =
of viruses. Ricardo accepts no liability for any damage caused by any =
virus transmitted by this e-mail. "Ricardo" means Ricardo plc and its =
subsidiary companies.
Ricardo plc is a public limited company registered in England with =
registered number 00222915.
The registered office of Ricardo plc is Bridge Works, Shoreham-by Sea, =
West Sussex, BN43 5FG.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - -=20

--=-KzyGIRvzo+Zjrnf9bIvS
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
CHARSET=3DUTF-8">
  <META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/3.0.9">
</HEAD>
<BODY>
Dear all,<BR>
<BR>
I have been using WBEL3.0 happily in a server environment for a while =
now and I am now trying to use it on some desktops instead of RH9.0.<BR>
<BR>
I seem to be bumping into a problem with WBEL being too aggressive with =
it's cacheing. It would appear to cache data at the expense of making =
applications use swap because there is no free memory. I only see this =
problem on WBEL3.0 and not RH9.0.<BR>
<BR>
I have applied the following kernel tweaks into /etc/sysctl.conf but =
they do not seem to have fixed the problem:<BR>
<BR>
#<BR>
# Fix for too aggressive file cacheing<BR>
#<BR>
vm.pagecache =3D 2 10 20<BR>
vm.inactive_clean_percent =3D 100<BR>
<BR>
<BR>
My application gets stuck into a swap frenzy and the machine grinds to a =
halt.<BR>
<BR>
Here is the output from cat /proc/meminfo:<BR>
<BR>
[grma@shane 59] ~ &gt; cat /proc/meminfo<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total:&nbsp;&nbsp;&nbsp; =
used:&nbsp;&nbsp;&nbsp; free:&nbsp; shared: buffers:&nbsp; cached:<BR>
Mem:&nbsp; 525836288 445038592 =
80797696&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 31404032 =
187092992<BR>
Swap: 2146787328 30904320 2115883008<BR>
MemTotal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 513512 kB<BR>
MemFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 78904 kB<BR>
MemShared:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 =
kB<BR>
Buffers:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30668 kB<BR>
Cached:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 181156 kB<BR>
SwapCached:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1552 kB<BR>
Active:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 347540 kB<BR>
ActiveAnon:&nbsp;&nbsp;&nbsp;&nbsp; 204324 kB<BR>
ActiveCache:&nbsp;&nbsp;&nbsp; 143216 kB<BR>
Inact_dirty:&nbsp;&nbsp;&nbsp;&nbsp; 32452 kB<BR>
Inact_laundry:&nbsp;&nbsp; 27108 kB<BR>
Inact_clean:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5700 kB<BR>
Inact_target:&nbsp;&nbsp;&nbsp; 82560 kB<BR>
HighTotal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 =
kB<BR>
HighFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; 0 kB<BR>
LowTotal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 513512 kB<BR>
LowFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 78904 kB<BR>
SwapTotal:&nbsp;&nbsp;&nbsp;&nbsp; 2096472 kB<BR>
SwapFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2066292 kB<BR>
HugePages_Total:&nbsp;&nbsp;&nbsp;&nbsp; 0<BR>
HugePages_Free:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<BR>
Hugepagesize:&nbsp;&nbsp;&nbsp;&nbsp; 4096 kB<BR>
<BR>
<BR>
My understanding of the &quot;vm.pagecache =3D 2 10 20&quot; tweak is =
that a maximum of 20% of system memory should be used as file cache. Why =
is it then that meminfo shows far more than this?<BR>
<BR>
Is there anything that I can do to improve the performance of my =
apps?<BR>
<BR>
Any help gratefully received.<BR>
<BR>
Regards<BR>
<BR>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
<PRE>--=20

Gary Mansell
Technical Computing Team Leader
IT Department
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ricardo Consulting Engineers Ltd.</PRE>
</TD>
</TR>
</TABLE>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <BR>=20
<BR><font size=3D1 font face=3D"arial" color=3Dnavy>This e-mail and any =
files transmitted with it are confidential and intended solely for the =
use of the individual or entity to=20

whom they are addressed.<BR>
If you have received this e-mail in error please notify the sender =
immediately and delete this e-mail from your system. Please note that =
any views<BR>
or opinions presented in this e-mail are solely those of the author and =
do not necessarily represent those of Ricardo (save for reports and =
other<BR>
documentation formally approved and signed for release to the intended =
recipient). Only Directors or Duly Authorised Officers are authorised to =
<BR>
enter into legally binding obligations on behalf of Ricardo unless the =
obligation is contained within a Ricardo Purchase Order. Ricardo may =
<BR>
monitor outgoing and incoming e-mails and other telecommunications on =
its e-mail and telecommuncations systems. By replying to this e-mail =
<BR>
you give consent to such monitoring. The recipient should check e-mail =
and any attachments for the presence of viruses. Ricardo accepts no <BR>
liability for any damage caused by any virus transmitted by this e-mail. =
"Ricardo" means Ricardo plc and its subsidiary companies.<BR>
Ricardo plc is a public limited company registered in England with =
registered number 00222915.<BR>
The registered office of Ricardo plc is Bridge Works,Shoreham-by Sea, =
West Sussex, BN43 5FG.</font><BR>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</BODY>
</HTML>

--=-KzyGIRvzo+Zjrnf9bIvS--