Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i read that it can massively improve responsiveness to mount certain directories in RAM (one guy claimed it can make firefox open in under half a second)
i can see the benefit of doing this, but how would i go about doing so? in particular how could i get it to write the modified files back to /usr?
fyi the ones i think would have greatest impact are
/usr/bin /usr/sbin /usr/lib and /lib
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,484
Rep:
Quote:
Originally Posted by origami-sheep
i read that it can massively improve responsiveness to mount certain directories in RAM (one guy claimed it can make firefox open in under half a second)
i can see the benefit of doing this, but how would i go about doing so? in particular how could i get it to write the modified files back to /usr?
fyi the ones i think would have greatest impact are
/usr/bin /usr/sbin /usr/lib and /lib
Generally speaking, the idea of using ram to speed things up isn't really worth it, for most users.
(I believe some servers use it to speed access times to large databases, etc.)
Yes it can be done by creating a ram disk, copying to it, & remounting onto it.
You have to create a custom initrd to do this, with a modified init-script that copies the contents of the directories to a tmpfs and then mounts that tmpfs as the directory you want to have in RAM.
I think it would be far easier to load the whole system in RAM, instead. Also, keep in mind that this will:
- have a negative effect on boot time.
- use much of your RAM, that can't be used for your applications. If you don't have enough RAM for the file-system and your applications the system will start to swap, which will slow down your system.
- only accelerate the first start of an application. If you have enough RAM to mount entire file-systems into it then your application will most likely be cached anyways after the first start.
So this can be a project for a nice learning experience, but I wouldn't recommend it for everyday use.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.