0

If I recall correctly, the same shared object is not loaded into memory twice when it's used by multiple processes. Is it possible to have some shared objects preloaded into memory asynchronously during boot so that the processes that use them start more quickly?

If this makes booting take slightly longer, that's fine, since I have to get my morning drink first anyway.

1

Yes, and they sometimes are. Take a look at https://www.linux.com/community/blogs/133-general-linux/757898-using-preload-to-speed-up-linux preload. It's an example of doing what you want. It doesn't really load them to "execution" memory but to "file cache" memory, but that's "close enough".

The other way to to compile and like a binary that uses the shared libraries and load that at boot. The real trick to that is knowing what libraries to load.

Also see https://askubuntu.com/questions/110335/drawbacks-of-using-preload-why-isnt-it-included-by-default

The same is true here. Your probably not going to get the benefit that you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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