UbuntuHelp:UbuntuLTSP/ResolveRamIssues
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
Note: This has been tested in Ubuntu Feisty. Gutsy contains a workaround already - you can use the variable already present.
Firefox under LTSP (Feisty) seems to crash when browsing graphics intensive pages. This is due to the fact that Firefox caches pixmaps locally (on the thin-client), and eventually consumes 100%, crashing the X session. The user is directed back to the login manager at this point.
The following workaround should help alleviate this issue, causing applications in X consuming more than 80% of total thin-client memory to exit, without crashing the entire session.
1) Create a $CHROOT/etc/ltsp/screen.d/ directory
2) Copy $CHROOT/usr/lib/ltsp/screen.d/ldm to this new directory, overriding the original
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
XRAMPERC=80
5) Reboot your thin-clients.
This workaround will cause Firefox to crash (with no warning), but will not lock the entire X session.
Apparently, Firefox 3 will have actual fixes and optimization capabilities for thin-client environments such as LTSP.