mass session dropping
Jim Kronebusch
jim at winonacotter.org
Wed Sep 12 20:33:07 UTC 2007
On Wed, 12 Sep 2007 13:13:22 -0700, john wrote
> Hi Scott,
>
> I haven't seen that thread. I searched the full text of the archives
> but I don't see it mentioned. Can you point me at it?
I think the thread was on the edubuntu-users list. Here is the original howto I posted:
--------------------------------------------------------------------------------
Here is another tip provided by Scott Balnaeves. If you are having trouble with an
application causing X to consume an overly large amount of RAM (which can result in a
hard freeze of the client) you can use the following to add a variable to lts.conf which
will prevent X from consuming a set limit of RAM.
First add the following to "/opt/ltsp/i386/usr/lib/ltsp/screen.d/ldm" above the last
line in the file that currently reads "exec ldm vt$ttynum :$displaynumexec":
XRAMPERC=${XRAMPERC:-100}
if [ ${XRAMPERC} -lt 100 ]; then
XMEM=0
while read TYPE VALUE UNITS; do
case ${TYPE} in
MemFree:|SwapFree:)
XMEM=$((${XMEM} + ${VALUE}))
;;
esac
done < /proc/meminfo
XMEM=$((${XMEM} * ${XRAMPERC} / 100))
ulimit -v ${XMEM}
fi
Save the file and then modify /opt/i386/ltsp/etc/lts.conf and add the following to your
[Default] section:
# Set maximum percentage of RAM consumed by X
XRAMPERC=95
And then save the file. Set this to the maximum percentage of RAM you ever want X to be
able to consume. In the example above X will never use more than 95% of total available
memory (this includes RAM and the nbdswap file). Say in the instance of firefox, upon
access of a website that would use more than 95% of available total system memory,
Firefox will immediately crash (not gracefully either and with no error message). So
although this isn't pretty, it does keep your client from hard freezing with no other
alternatives than a manual reboot.
--
This message has been scanned for viruses and
dangerous content by the Cotter Technology
Department, and is believed to be clean.
More information about the edubuntu-devel
mailing list