个人工具

“UbuntuHelp:UbuntuLTSP/ResolveRamIssues”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/UbuntuLTSP/ResolveRamIssues}}
 
{{From|https://help.ubuntu.com/community/UbuntuLTSP/ResolveRamIssues}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/ResolveRamIssues}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/ResolveRamIssues}}
'''Note: This has been tested in Ubuntu Feisty. Gutsy contains a workaround already - you can use  the variable already present.'''<br>
+
{|border="1" cellspacing="0"
<br>
+
|This page is specific to Ubuntu versions 7.10, 8.04
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.<br>
+
|}
<br>
+
''If you find this information applicable to additional versions/releases, '''''please''''' edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.''
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.<br>
+
----
<br>
+
Applications such as Firefox and Openoffice.org utilize what you call X11 "Pixmap caching", which caches viewed images on local thin-client memory (READ: not the server) for fast viewing. This can be troublesome for low-memory thin-clients (< 256MB typically), as pixmap cache can consume ALL of the thin-client memory, causing X to crash as well as other undesired behavior. This practice contradicts the generally accepted view that thin-clients need not large amounts of memory, since they rely on the server for the heavy lifting (CPU/Memory requirements).
<br>
+
Steps are being taken by the Firefox and Openoffice.org team to make their programs more robust for thin-client environments such as LTSP by limiting the amount of pixmap caching that happens. In the meanwhile, however, and with other offending applications, the following procedure can be executed to limit the amount of havoc that occurs when an application tries to consume all of a thin-client's memory:
1) Create a $CHROOT/etc/ltsp/screen.d/ directory<br>
+
* Create and/or edit ''/var/lib/tftpboot/ltsp/i386/lts.conf'' (or the directory of your thin-client architecture) and add the following line:
2) Copy $CHROOT/usr/lib/ltsp/screen.d/ldm to this new directory, overriding the original<br>
+
3) Insert the following code before the last (exec ldm ...) line:  
+
 
<pre><nowiki>
 
<pre><nowiki>
XRAMPERC=${XRAMPERC:-100}
+
X_RAMPERC=80
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
+
 
</nowiki></pre>
 
</nowiki></pre>
<br>
+
* Reboot your thin-clients.
<br>
+
"X_RAMPERC" stands for "X RAM PERCENT". It will cause Firefox, OpenOffice.org and other offending applications to crash (with no warning) after consuming 80% of the total thin-client memory, yet will not cause the ultimate havoc of locking the entire X session.
4) Edit the $CHROOT/etc/lts.conf and add the following line:
+
Apparently, Firefox 3 has optimization capabilities for thin-client environments such as LTSP.
<pre><nowiki>
+
XRAMPERC=80
+
</nowiki></pre>
+
<br>
+
5) Reboot your thin-clients.<br>
+
<br>
+
This workaround will cause Firefox to crash (with no warning), but will not lock the entire X session.<br>
+
<br>
+
Apparently, Firefox 3 will have actual fixes and optimization capabilities for thin-client environments such as LTSP.
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年5月12日 (二) 19:14的最新版本

This page is specific to Ubuntu versions 7.10, 8.04

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.


Applications such as Firefox and Openoffice.org utilize what you call X11 "Pixmap caching", which caches viewed images on local thin-client memory (READ: not the server) for fast viewing. This can be troublesome for low-memory thin-clients (< 256MB typically), as pixmap cache can consume ALL of the thin-client memory, causing X to crash as well as other undesired behavior. This practice contradicts the generally accepted view that thin-clients need not large amounts of memory, since they rely on the server for the heavy lifting (CPU/Memory requirements). Steps are being taken by the Firefox and Openoffice.org team to make their programs more robust for thin-client environments such as LTSP by limiting the amount of pixmap caching that happens. In the meanwhile, however, and with other offending applications, the following procedure can be executed to limit the amount of havoc that occurs when an application tries to consume all of a thin-client's memory:

  • Create and/or edit /var/lib/tftpboot/ltsp/i386/lts.conf (or the directory of your thin-client architecture) and add the following line:
X_RAMPERC=80
  • Reboot your thin-clients.

"X_RAMPERC" stands for "X RAM PERCENT". It will cause Firefox, OpenOffice.org and other offending applications to crash (with no warning) after consuming 80% of the total thin-client memory, yet will not cause the ultimate havoc of locking the entire X session. Apparently, Firefox 3 has optimization capabilities for thin-client environments such as LTSP.