Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the problem with tmpfs and google chrome. When chrome runs, it uses /run/shm to keep some files like /run/shm/.com.google.Chrome.RnIWmb, 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
314
#-------in lsof:
chrome    27194     user   22u      REG               0,14     524180    2854723 /run/shm/.com.google.Chrome.RnIWmb (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. –  eicto 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 –  eicto Nov 9 '12 at 14:57
2  
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

1 Answer 1

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 –  eicto Jan 16 '13 at 13:39
    
also i not understand how come that old good disk caches worse than tmpfs –  eicto 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/.com.google.Chrome.5rwhEN (deleted) –  eicto 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 –  eicto Jan 16 '13 at 14:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.