[19:06] Hi people, i wanna put /home/user/.cache and /tmp directories in /run/shm to increase performance and clean temp files on every reboot. Can i do this with symlinks ?? [19:29] vorathiel21: I'd recommend using tmpfs for /tmp [19:30] https://askubuntu.com/a/173294/1614 [19:31] as far as cache is concerned unless there's a reason not to write .cache I'd leave it alone [19:31] reason being: [19:31] There's a lot of things in there that will take longer to re-create [19:31] eg: thumbnails and the like [19:32] so you'll slow your machine down if you constantly re-create cache [19:37] thanx for your answer. i've already try tmpfs . it worked fine . The thing is today i discover this /run/shm directory [19:37] It's the same thing [19:37] If you cd to /run and type `df .` you'll see that it's using tmpfs [19:39] https://askubuntu.com/questions/169495/what-are-run-lock-and-run-shm-used-for [19:42] don't you think if i put those directories under /run/shm , them will share the space ?? i think it's a waste of ram to declare separated tmpfs in fstab for /tmp and .cache ... if there is already a ramdrive available on /run/shm [19:43] am i wrong ?? [19:43] I think you're misunderstanding how Linux allocates RAM [19:43] it can be possible [19:44] tmpfs is not cordoned off the way you might think it would be for a physical disk [19:44] eg: /run/shm doesn't have half of your memory allocated [19:45] It's showing the maximum that it will allocate [19:45] What is allocated is what you see when you run df [19:46] Linux tries to keep as much in an internal cache as possible for performance [19:46] and will free up those pages as memory pressures become larger [19:46] That's why if you run `free` you'll notice that there's precious little memory left [19:47] that's Linux trying to ensure that it goes to disk as few times as it can [19:47] most of the time it'll read things from cache [19:48] hmmm [19:49] here's an easy test [19:49] as root: [19:49] sync; echo 1 > /proc/sys/vm/drop_caches [19:49] that will clear out the cache [19:49] then run (as a normal user) `watch free` [19:49] and use your machine [19:49] You'll notice it start to fill up the cache again [19:50] i understand. So... linux already is doing what am trying to do [19:51] Exactly [19:51] changing /tmp to tmpfs is still a decent idea [19:51] I do it on all of my machines [19:52] but going much beyond that isn't going to give you what you think it will [19:55] thank you for enlightening me on this [19:56] no problem. glad I could help [19:56] c ya [19:56] ttyl