[DONE]Cache in ramdisk

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[DONE]Cache in ramdisk

Postby mackowiakp » Jun 16th, '16, 09:13

Can i move all $HOME/.cache files/dirs to tmpfs filesystem? I want to reduce write cycles on SSD disk. I know how to create tmpfs via fstab and mount it in place $HOME/.cache. But will it have unexpected impact for whole system work? I have 32 GB RAM and at this moment $HOME/.cache occupies aprox 2,4 GB on SSD.
Last edited by mackowiakp on Jun 17th, '16, 13:14, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Cache in ramdisk

Postby doktor5000 » Jun 16th, '16, 17:36

What unexpected impact for the whole system? Your system itself doesn't care about $HOME/.cache
But you should limit the size of the tmpfs, as by default it uses half of the overall RAM. And don't only overmount $HOME/.cache with a tmpfs but copy the contents into the tmpfs once it's mounted ...

FWIW, I wouldn't waste RAM for that. Have you at least measured how many writes are going there, compared to other, hotter disk spots? Or are you simply doing this out of the blue ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Cache in ramdisk

Postby jiml8 » Jun 16th, '16, 20:16

I also would not worry about write cycles on the SSD. Modern SSDs are capable of enough write cycles that you probably will want to replace it with a higher capacity version well before it is worn out.

For reference, I have my home directory located on a 500 GB SSD which is shared with several VMs that I use for development, thus large compiles with lots of I/O and lots of writes occur on this device. I installed it in October of 2014 and as of now it is 78% full and the wear leveling count, as reported by smartctl, is 15. The device is rated for a wear leveling count of 100. Thus, based upon my usage, wearout will occur approximately 9 years from now. My other SSD, which hosts / as well as a number of other VMs, shows a wear leveling count of 8, so it should be good for about another 19 years.

I support a friend's computer, and I installed a 1 TB SSD in her machine about 16 months ago. This machine runs Mageia as its host, and supports 2 Windows 7 VMs. She is clueless and does not take any action to optimize her machine. She also has had some problems, and recopying backup VMs back onto her SSD to fix Windows problems has happened several times. Her SSD currently shows a wear leveling count of 37, which is very high, and gives a total projected life of only another 2.25 years. I doubt your usage will be as heavy as hers, and if she were not so clueless, her usage would not be that heavy either.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: [DONE]Cache in ramdisk

Postby mackowiakp » Jun 17th, '16, 13:15

OK. you convinced me !
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest