Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Simple preloading.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Goo
n00b
n00b


Joined: 07 Dec 2005
Posts: 6

PostPosted: Wed Dec 07, 2005 2:28 pm    Post subject: Simple preloading. Reply with quote

So your system boots in <15sec, but your apps still start longer than you would like to. The solution is to preload them.

Add this to /etc/conf.d/local.start:
Code:

tar c /usr/lib/mozilla-firefox 2> /dev/null | cat > /dev/null


This really works. Note:" | cat" is neccessary, otherwise tar won't read the files.

I wonder, is there a way to run preloading while gdm is prompting for username?
Back to top
View user's profile Send private message
wangxiaohu
Apprentice
Apprentice


Joined: 15 Nov 2003
Posts: 248

PostPosted: Wed Dec 07, 2005 7:41 pm    Post subject: Re: Simple preloading. Reply with quote

Does these two options in /etc/X11/gdm/gdm.conf work for you?
Code:

# Program to run to draw the background in the standard greeter.  Perhaps
# something like an xscreensaver hack or some such.
#BackgroundProgram=
# if this is true then the background program is run always, otherwise
# it is only run when the BackgroundType is 0 (None)
#RunBackgroundProgramAlways=false

Goo wrote:
So your system boots in <15sec, but your apps still start longer than you would like to. The solution is to preload them.

Add this to /etc/conf.d/local.start:
Code:

tar c /usr/lib/mozilla-firefox 2> /dev/null | cat > /dev/null


This really works. Note:" | cat" is neccessary, otherwise tar won't read the files.

I wonder, is there a way to run preloading while gdm is prompting for username?
Back to top
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Wed Dec 07, 2005 7:59 pm    Post subject: Reply with quote

I would suggest running
Code:
man readahead

and seeing what that gets you.

Its probably a better way than with tar and cat =)
Back to top
View user's profile Send private message
Goo
n00b
n00b


Joined: 07 Dec 2005
Posts: 6

PostPosted: Wed Dec 07, 2005 9:43 pm    Post subject: Re: Simple preloading. Reply with quote

wangxiaohu wrote:
Does these two options in /etc/X11/gdm/gdm.conf work for you?
Code:

# Program to run to draw the background in the standard greeter.  Perhaps
# something like an xscreensaver hack or some such.
#BackgroundProgram=
# if this is true then the background program is run always, otherwise
# it is only run when the BackgroundType is 0 (None)
#RunBackgroundProgramAlways=false


This seems to be a good idea, I'll check. Thanks.

Chaosite: Reading with tar & cat can be done with a simple bash script, but to call readahead you have to use C.

Edit: Ok, I tested gdm background program option. But it doesn't seem to work.
Back to top
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Thu Dec 08, 2005 5:03 am    Post subject: Re: Simple preloading. Reply with quote

Goo wrote:
Chaosite: Reading with tar & cat can be done with a simple bash script, but to call readahead you have to use C.


True, but by using readahead you are telling the kernel exactly what you are trying to do. The kernel might act different when told to readahead as opposed as when told to tar something up.
Back to top
View user's profile Send private message
irbaboon
n00b
n00b


Joined: 24 Mar 2005
Posts: 4

PostPosted: Thu Dec 08, 2005 4:47 pm    Post subject: Reply with quote

preload uses readahead ...
Back to top
View user's profile Send private message
Immortal_x86
n00b
n00b


Joined: 24 Jul 2005
Posts: 19

PostPosted: Thu Jan 12, 2006 6:37 pm    Post subject: Reply with quote

maybe interesting for you...
https://forums.gentoo.org/viewtopic-t-422244-highlight-preload.html
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3221

PostPosted: Fri Jan 13, 2006 12:16 am    Post subject: Re: Simple preloading. Reply with quote

Goo wrote:
I wonder, is there a way to run preloading while gdm is prompting for username?

I dont' know about gdm, but if you use xdm you can probably put that command in the start of the file /etc/X11/xdm/Xsetup_0.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum