System crashing when swap hits 25%
Simon Slater
pyevet at aapt.net.au
Wed Mar 12 01:22:58 UTC 2008
On Tue, 2008-03-11 at 12:53 -0400, Chris Snook wrote:
> Simon Slater wrote:
> > On Mon, 2008-03-10 at 21:01 -0400, Chris Snook wrote:
> >>>> sysrq-m and sysrq-t data out of the system. You'll want to set
> >>>> kernel.sysrq=1 first.
> >>> Where do I find these?
> >>>
> >> There are two interfaces. One is the /proc/sys directory, and the
> >> other
> >> is sysctl. If you want to set something with sysctl, the easy way is
> >> to
> >> add a line in sysctl.conf (for example: vm.overcommit_memory=2) and
> >> then
> >> run sysctl -p to process the config file again.
> >>
> > Have just been through a few man pages.
> > Temporarily, the command sysctl vm.overcommit_memory=2 would do the job?
>
> By itself, probably not.
>
> > What does the value '2' signify?
>
> 0 = heuristic overcommit
> 1 = always overcommit (until completely out of RAM + swap)
> 2 = overcommit (swap + (vm.overcommit_ratio * RAM))
>
> > What do sysrq-m and sysrq-t do? I haven't found them yet.
>
> alt+sysrq+m prints memory statistics
> alt+sysrq+t prints thread state information
Silly me. It's been so long since I used that key I forgot it is there.
>
> > Oh, currently vm.overcommit_memory=0 and kernel.sysrq=0.
>
> You'll need to set kernel.sysrq=1 for keyboard sysrq input to be
> honored. If you set vm.overcommit_memory=2, then vm.overcommit_ratio
> will be honored.
>
> -- Chris
>
I used sysctl vm.overcommit_memory=2 and checked for badblocks in the
swap file (none found) and performance is amazing. This is very
subjective, but I can load and run so much more and I'm sure things are
runnung faster.
At the moment the panel applet is at the point where things usually
hang. free reports:
[simon at Ipex ~]$ free
total used free shared buffers
cached
Mem: 515220 509020 6200 0 5596
215728
-/+ buffers/cache: 287696 227524
Swap: 1048568 213904 834664
However, rather than the usual 2 or 3 apps with a few browser tabs open
when things hang, at the moment I have: terminal; Firefox with 20 tabs;
2x Konqueror one with 3 tabs; Evolution downloading email and
spamassassin; 24 OOWriter docs; 6 OOImpress presentations; 11 Kpdf with
11Mb pdf and 1 10Mb pdf; 13 brochures open in Evince; 2 tty sessions
with 1 running an smbtar script and jobs to the printer. This is
amazing.
I'll push things further now to see what happens as swap increases.
--
Regards
Simon
More information about the users
mailing list