Bug 121939

Summary: preload free memory caculation error
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Markus Meisters <mmeisters>
Component: BasesystemAssignee: Stephan Kulow <coolo>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: nordhaus
Version: RC 4   
Target Milestone: ---   
Hardware: i586   
OS: SUSE Other   
Whiteboard:
Found By: IS&T Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: fix of appspreloader.sh

Description Markus Meisters 2005-10-10 11:27:10 UTC
Hello,

the current appspreloader.sh uses only the real unused free memory instead of
using the cached one too.

Attached you will find my version of appspreloader.sh
Comment 1 Markus Meisters 2005-10-10 11:28:26 UTC
Created attachment 52075 [details]
fix of appspreloader.sh
Comment 2 Dr. Werner Fink 2005-10-10 12:49:54 UTC
type -p appspreloader.sh
/usr/bin/appspreloader.sh

maintainer preload
coolo@suse.de
Comment 3 Stephan Kulow 2005-10-10 13:11:42 UTC
removing other things from the cache isn't really the wanted effect. So I'd go 
with WONTFIX - but maybe I misunderstand 
Comment 4 Markus Meisters 2005-10-10 13:47:17 UTC
thanks for redirecting the bug ;)

mmeiste@wilkins:/tmp> maintainer preload
bash: maintainer: command not found


My understanding of the preloading is that I want special apps preloaded not a
filesystem structure that i will normally never use, right? The cache eats all
free memory (exept a few megabytes) for caching files not needed. So if I
preload my soffice,eclipse,netbeans it would be nice if it is really preloaded.
If you test starting a lot of big apps you will see that the filesystem cache
shrinks also to get free memory.

So if you have prepared everything for preloading apps it would be nice that it
works as long if there is real free memory.

Comment 5 Stephan Kulow 2005-10-10 13:52:31 UTC
but why would you remove everything e.g. kdesktop and kicker need from the 
file system?  
Comment 6 Stefan Nordhausen 2005-10-10 13:54:42 UTC
Using only the really unused free memory was the original intention when I wrote
appspreloader. As Stephan already said, you don't want to remove stuff from the
cache. If you did that, you might un-preload things that you just preloaded,
causing lots of useless hard disc activity.

But this was designed to be used at login time, when there is lots of really
unused memory anyway. Markus, if I understand you correctly you want to start
the preloading directly as a user, after you have been logged in for a while,
correct? If so, what do you want to achieve with that?
Comment 7 Markus Meisters 2005-10-10 15:21:38 UTC
Why removing kdesktop or kicker? This apps are runing, right?

I was not aware of the original intention - so I agree that it this not a bug. I
wan't to remove stuff from the cache as stuff will be removed from the cache if
I start this applications directly after login. I want to achive that the
applications which I use/start very often are preloaded - configuration files
and libraries which are only used during X/kde startup could be removed.
Comment 8 Stefan Nordhausen 2005-10-11 23:52:44 UTC
For a quick and dirty way to preload stuff you can do

cat /etc/preload.d/kdm | sed s/^open/W/g | sed s/^stat/S/ | preload

The question is: What will the kernel remove from cache when no unused memory is
available? If the kernel does a "least frequently used" technique, you will
remove your previously preloaded data, because it has been used only once
(during preload). If the kernel does "least recently used" it will do what you
intended and remove stuff that was only used for booting (=long time ago). You
need to ask the kernel people exactly how the kernel handles this.
Comment 9 Stephan Kulow 2006-02-04 15:52:09 UTC
see comments