Mailinglist Archive: yast-devel (191 mails)

< Previous Next >
[yast-devel] you can help SCR to be lazy
  • From: Martin Vidner <mvidner@xxxxxxx>
  • Date: Fri, 28 Mar 2008 18:14:06 +0100
  • Message-id: <20080328171406.GB8114@xxxxxxxxxxxxxxxx>
Hi hackers,

Short:

Please take your modules and rename the contained .scr files after
the paths they serve:

.foo.bar.baz -> foo_bar_baz.scr

Long:

in Alpha 3, SCR can be lazy. That is, it will not read all the *.scr
files to register all the agents at the first opportunity. Instead,
it guesses which file an agent is defined in and reads only that
file. Only when that fails it does the big sweep.
The aim is to reduce startup time, and thanks to Michael Meeks for
bringing that topic up.

It only works if the files are named accordingly. Most of them are
but a major exception is .sysconfig.foo which are currently in
cfg_foo.scr . And then all the other ones here and there.

(In Alpha3, yast2-core-2.16.39 looks for foo.bar.baz.scr which does
not fit the way most scr files are named now. I have just submitted
.41 which uses underscores. Also, a warning "Scripting agent
sweeping" will be logged when it has to give up and walk the disk.)

I tried to measure the actual improvement, but did not get very
far(*).
To begin with, there are environment variables to restore the old
behavior so that we can do any measuring at all:
Y2SCRSWEEP=1 sweeps as soon as SCR is called
Y2SCRNOSORT=1 does not sort the scr files (normally, when sweeping I
try to reduce the penalty by sorting the files according to their
inode number, hoping that it will result in sequential disk head
movement)

(*)
I measured it this way, but got no difference :-/ Either this is all
useless or I can blame VirtualBox.

Repeat several times:
echo 3 > /proc/sys/vm/drop_caches; time Y2SCRSWEEP=1 Y2SCRNOSORT=1 yast2 nfs
help
and then with the new code:
echo 3 > /proc/sys/vm/drop_caches; time yast2 nfs
help

Next I will try on a real machine. Also I could try iogrid, but we
don't seem to have in the build service (hint hint...)

--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages