View previous topic :: View next topic |
Author |
Message |
dberkholz Retired Dev
Joined: 18 Mar 2003 Posts: 1008 Location: Minneapolis, MN, USA
|
Posted: Mon Aug 21, 2006 5:53 am Post subject: |
|
|
Could you integrate this into sys-apps/readahead-list and drop a patch to the author? |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Aug 21, 2006 6:40 pm Post subject: |
|
|
I did file a bug to include this in the readahead-list and start some useful discussions but it was quickly closed as a duplicate of another bug, which is almost dead. devs closing enhancements fast is a major putoff... And if you try to reopen, they threaten to ban you... So, I didn't press much this time.
https://bugs.gentoo.org/show_bug.cgi?id=142338
I have no interest in seeing it going into readahead-list anymore. Its not such a big deal to get a few seconds faster boot up or app startup. It was just an idea that occurred to me and I tried it out. If someone feels that it absolutely rocks and should be integrated, please raise your hand and volunteer to put it there... |
|
Back to top |
|
|
gerardo Apprentice
Joined: 05 Feb 2004 Posts: 228 Location: Belgium
|
Posted: Fri Sep 22, 2006 9:51 am Post subject: |
|
|
Shouldn't the my-readahead script be placed in the boot runlevel instead of the default?
This question was asked before, but I haven't seen an answer to it _________________ Windoze : Plug and Pay... |
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Sun Sep 24, 2006 11:03 pm Post subject: |
|
|
I've followed the instructions in the first post but this
does not work for me.
lsof *is* installed (honest and truly).
When I boot two files are created in /etc/conf.d
They are sofile-list.load and sofile-list.load0
They are both empty. The sample-init-process script
seems to run only for a split second ... It does not show
up in ps even immediately after boot.
If I try to run the sample-init-process on its own from a konsole,
it craps out with this error:
/usr/sbin/sample-init-process: line 63: : No such file or directory
That may not be relevant.
Anyway, any advice would be appreciated. |
|
Back to top |
|
|
maximan Tux's lil' helper
Joined: 29 Nov 2005 Posts: 110 Location: Rio Cuarto-Argentina
|
Posted: Mon Sep 25, 2006 9:18 pm Post subject: |
|
|
I'm using the first script. Is there any change or update of this script ??
M. |
|
Back to top |
|
|
gerardo Apprentice
Joined: 05 Feb 2004 Posts: 228 Location: Belgium
|
Posted: Tue Sep 26, 2006 9:42 pm Post subject: |
|
|
albright wrote: | I've followed the instructions in the first post but this
does not work for me.
lsof *is* installed (honest and truly).
When I boot two files are created in /etc/conf.d
They are sofile-list.load and sofile-list.load0
They are both empty. The sample-init-process script
seems to run only for a split second ... It does not show
up in ps even immediately after boot.
If I try to run the sample-init-process on its own from a konsole,
it craps out with this error:
/usr/sbin/sample-init-process: line 63: : No such file or directory
That may not be relevant.
Anyway, any advice would be appreciated. |
Just to be sure, have you copied everything exactly? Attention for linebreaks...
Have you made the uniquer script executable ?
Check that you have /usr/bin/awk
If not, emerge sys-apps/gawk _________________ Windoze : Plug and Pay... |
|
Back to top |
|
|
gerardo Apprentice
Joined: 05 Feb 2004 Posts: 228 Location: Belgium
|
Posted: Tue Sep 26, 2006 9:48 pm Post subject: |
|
|
maximan wrote: | I'm using the first script. Is there any change or update of this script ??
M. | It would be great to have it in portage or perhaps in an overlay...
But the dev doesn't like it apparently, as the bug was closed immediatly...
I'm afraid we'll have to check this post regularly _________________ Windoze : Plug and Pay... |
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Wed Sep 27, 2006 8:07 pm Post subject: |
|
|
Quote: | Just to be sure, have you copied everything exactly? Attention for linebreaks...
Have you made the uniquer script executable ?
Check that you have /usr/bin/awk
If not, emerge sys-apps/gawk |
Thanks for that but that's all ok ... can't imagine what's wrong |
|
Back to top |
|
|
trevorj n00b
Joined: 13 May 2003 Posts: 68
|
Posted: Thu Sep 28, 2006 5:59 am Post subject: |
|
|
gerardo wrote: | It would be great to have it in portage or perhaps in an overlay...
But the dev doesn't like it apparently, as the bug was closed immediatly...
I'm afraid we'll have to check this post regularly |
It's not that the dev didn't like it, he just marked it as a dupe of another bug; Another way of saying 'Hey, this was here before! Continue on in the original bug so we don't have to go back and forth'
This set of scripts reminds me of preload actually. http://preload.sf.net if anyone's interested.
I think readahead-list should be used instead of catting the files |
|
Back to top |
|
|
nowinter Tux's lil' helper
Joined: 30 Apr 2006 Posts: 90
|
Posted: Thu Nov 02, 2006 4:30 pm Post subject: |
|
|
same as allbright, got a couple of files /etc/conf.d/sofile-list.load and /etc/conf.d/sofile-list.load0.. seems that there would be more as the script runs.. no doubt it runs, i see it in processes, as well as plenty of its greps, lsofs and a sed process. but the files are empty, even after many hours. i tried to rm them, touch /forcesampler and re-done all the howto steps actuallly. nada. _________________ All In All Is All We All Are |
|
Back to top |
|
|
nowinter Tux's lil' helper
Joined: 30 Apr 2006 Posts: 90
|
Posted: Thu Nov 02, 2006 4:43 pm Post subject: |
|
|
although there are files in /tmp, i mean init_sample1 and 2, full of file names.. why don't they get to /etc/conf.d/sofile-list.load ? _________________ All In All Is All We All Are |
|
Back to top |
|
|
nowinter Tux's lil' helper
Joined: 30 Apr 2006 Posts: 90
|
Posted: Thu Nov 02, 2006 8:55 pm Post subject: |
|
|
disregard two previous posts of mine, after app. 6 hours there is a bunch of content in /etc/conf.d/sofile-list.load.
Although it consists in a big part of just regular files, apparently brought there by amule/amarok etc. By no means they would fit in memory altogether
Should I just drop them from the list? Or may be I need to add a grep -v option to the script so they don't pop up again... as well as changing .mozilla to .opera so the stored mails won't raise to memory..
Anyway, thanks, I think I've finally got the point of the readahead work now can't wait to the next boot. _________________ All In All Is All We All Are |
|
Back to top |
|
|
XAvAX n00b
Joined: 31 Dec 2004 Posts: 24
|
Posted: Thu Nov 16, 2006 7:03 pm Post subject: |
|
|
I was just thinking, maybe speed-daemon would be a good name for it, and we could name the sampler speed-daemon-sampler for readability. If we change uniquer to non-sorting-uniquer, that might be nice for readability too, but tell me if I'm taking it too far. That's just how I named them on my system so I wouldn't forget what they did. But because I'll probably forget anyway, I wrote this MAN page.
Save it as /usr/share/man/man1/speed-daemon.1 and then gzip it, and you're good to go! (I must apologize, I don't know how to bold in manpages - But at least I got the line wrap length right! [or at least, it matches convert's]) Feel free to correct my numbers, spelling, etc. as you see fit.
I also made one edit to the initscript, I made it invoke its own stop function before eend, and since its stop function is eend, it works out nicely (With the side benefit of a millisecond improvement in shutdown times )
Code: | speed-daemon(1)
NAME
/etc/init.d/speed-daemon - speed booting and application startup by preloading accessed
files.
SYNOPSIS
/etc/init.d/speed-daemon [start|stop]
OVERVIEW
The speed-daemon init script functions by calling cat() to read a list of files, and then
it invokes cat() again, to read the files referenced by that list to /dev/null,
effectively preloading them through caching.
OPTIONS
start Executes the script. If /resample exists, it triggers it to rebuild its list of
files to cache.
stop Normally this would stop a script, but as it completes when run, this is
unnecessary. It is preserved so that the rc-script system doesn't get confused.
NOTES
It is probably most useful if placed in the "boot" runlevel, as it then preloads all of
your init process, as well as possibly [x|k|g]dm. If you wish to resample the list of
files, simply touch() /resample and reboot. If it does not seem to work, try to open
/etc/conf.d/sofile-list.load with your favorite pager. It should have somewhere in the
vicinity of 200 files if you are preloading a graphical login, maybe 100 more if you
sample the login/applications starting process as well, and maybe 100 less if you only
preload to the console. If there seem to be unusually few files listed, try decreasing the
"sleep" timer near the end of /usr/sbin/speed-daemon-sampler, as your computer is likely
too fast. If, on the other hand, it seems to bog down your entire system, this is somewhat
normal as creating the file list is rather resource-intensive. If, however, the computer
seems to return to normal operation too early, ending before some programs you wished to
preload ran, I will note that the sleep timer multiplied by the total number of samples
(right at the top) is how long it will actually run. The script itself depends on lsof.
Also, it uses the aptly named /usr/bin/non-sorting-uniquer to ensure that nothing is
preloaded twice, while retaining them in the order they are called. It is very fast (It
can unique a list of 41,207 words in 0m0.083 seconds, which was essential in this
application). It depends on awk.
CREDIT
Credit for the initscript and sampler goes to devsk of the gentoo forums.
Credit for the uniquer goes to lazarusrat of the same.
This comes from the forum thread at: http://forums.gentoo.org/viewtopic-t-478491.html |
_________________ That which we do not ask will never be learned |
|
Back to top |
|
|
|
|
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
|
|