Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
93
rated 0 times [  93] [ 0]  / answers: 1 / hits: 77727  / 2 Years ago, fri, june 10, 2022, 7:26:13

I would like to know what are the drawbacks of using preload? If there would be no downside, preload would be enabled by default, so I guess there are some.



Okay you need a bit more RAM, but most people have by far more RAM then Ubuntu needs - so what are the downsides of using preload?


More From » ram

 Answers
0

Simply put, Preload isn't for everyone. It is great if you open applications or libraries a lot. It is harmful if you load applications or libraries only occasionally. I will use two examples from my actual usage (and yes I use preload).



First, Google Chrome. Now a browser is opened only once per boot, maybe twice (for me, I am a web developer). Chrome and its related libraries stay in memory because I am always using it. Even when I close all the chrome windows it's still in the background doing its thing. Thus all the ram dedicated to holding a preload copy of Chrome is a total and utter waste. It's never (or rarely) unloaded. For the average user this is true for a great number of applications. A Office user will almost always have their email app open. So the small savings in startup time is completely wasted because they only open their email app once a day, and leave it open.



The Second example is rake. As a ruby developer that believes in testing I run rake a TON. rake runs, executes for a couple of seconds - minutes then exits. Preload helps me speed up my daily work because it loads rake and its needed libraries (which can be very extensive) ahead of time. So there are a lot of starts and stops to the running of rake. The extra ram used to speed up the 400 or 500 launches of rake over the span of a few hours is totally worth it.



So the reason it's not enabled by default is because its ability to actually improve performance is based largely on how you use your system. For some people it will be a negative and for others a positive.



Lastly, having preload on, even if you're not using it, consumes ram. So if you're not launching applications frequently, you could actually make your entire system fractionally slower by not having that ram available for other types of caching. Remember, even if you have 32 Gigs of ram Linux will try to use as much of it as it can to cache data to make your interaction faster. By using preload you reduce that free memory some. Even if it is just a little tiny bit, the 2 seconds you saved launching chrome 1 time could cost you 60 seconds over the month it stays running.


[#40017] Friday, June 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
finatch

Total Points: 49
Total Questions: 106
Total Answers: 94

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
;