Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the problem with tmpfs and google chrome. When chrome runs, it uses /run/shm to keep some files like /run/shm/, the files are (deleted) but still open, that cause overusage of tmpfs - 500Mb in good state, that make computer swapping, all slowdown.

some code

lsof -n |grep /run/shm |grep '^chrome' |grep deleted|wc -l
#-------in lsof:
chrome    27194     user   22u      REG               0,14     524180    2854723 /run/shm/ (deleted)
share|improve this question
If Chrome is still running, then it's actually using those files for shared memory (shm), and deleting them will break Chrome. – pjc50 Nov 9 '12 at 14:46
@pjc50 that files deleted by chrome, not me. – zb' Nov 9 '12 at 14:47
Right, but the point is that it's part of Chrome's memory usage. (How much RAM do you have?) – pjc50 Nov 9 '12 at 14:48
4G of memory, the problem that tmpfs worse than cache as i see – zb' Nov 9 '12 at 14:57
Not mounting /run/shm as tmpfs is likely to break your system, and it will not change Chrome's performance. Chrome needs those files, changing what filesystem they are stored on will not change that. – Gilles Nov 11 '12 at 15:35

Rather than to remove the tmpfs mount entirely, robbing the other processes on your system this quick and efficient resource, have you tried running chrome using --disk-cache-dir? It seems that google has defaulted to using tmpfs storage either for speed or reduced wear on ssd's, but I don't really know. A list of command line options for chrome is listed here.

share|improve this answer
idk why, but tmpfs is not efficient and fast on my system, it just make all swapping :) I already umount tmpfs from everywhere and feel much better than early – zb' Jan 16 '13 at 13:39
also i not understand how come that old good disk caches worse than tmpfs – zb' Jan 16 '13 at 13:42
also, this is not disk cache, just tried to run google-chrome --disk-cache-dir /tmp/aaa and got chrome 17743 user 184u REG 8,17 1040420 302691 /run/shm/ (deleted) – zb' Jan 16 '13 at 13:54
Another option that may work is to actually limit the size of the tmpfs mount so that it doesn't cause your system to start swapping. The mount option is size=(bytes or percent), which is explained better in man 8 mount. This may limit the number of sites that you can visit in a single instance of chrome, but it will help your memory condition. Outside of that, the only other reasonable and simple method to handle this is to run chrome in a chroot with the /path/to/chroot/run/shm residing on the disk. Since I see you have debian tagged, you can use the schroot package to do this. – umeboshi Jan 16 '13 at 14:15
that cause chrome glitches as it fills out shm drive very fast – zb' Jan 16 '13 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .