Is this on the wiki somewhere? If not, could you put it there?
Peter
Jim Kronebusch wrote:
> ---------- Forwarded Message -----------
> From: "Jim Kronebusch" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Sun, 2 Sep 2007 14:03:04 -0500
> Subject: How to keep X from consuming all available client RAM
>
> 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.
>
> Jim Kronebusch
> Cotter Tech Department
> 453-5188
> ------- End of Forwarded Message -------
>
>
> Jim Kronebusch
> Cotter Tech Department
> 453-5188
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net