linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Application load times
@ 1999-05-31 19:11 Emil Briggs
  1999-05-31 19:33 ` Matthew Kirkwood
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Emil Briggs @ 1999-05-31 19:11 UTC (permalink / raw)
  To: linux-mm

Are there any vm tuning parameters that can improve initial application
load times on a freshly booted system? I'm asking since I found the
following load times with Netscape Communicator and StarOffice.


Communicator takes 14 seconds to load on a freshly booted system

On the other hand it takes 4 seconds to load using a program of this sort

  fd = open("/opt/netscape/netscape", O_RDONLY);
  read(fd, buffer, 13858288);    
  execv("/opt/netscape/netscape", argv);

With StarOffice the load time drops from 40 seconds to 15 seconds.


The reason this came up is because I installed Linux on a friends
computer who usually boots it a couple of times a day to check email,
webbrowse or run StarOffice -- they immediately asked me why it
was so slow. Since I know how they usually use their computer it was
easy enough to remedy this with the little bit of code above. Anyway
does anyone know if there a more general way of improving initial load
times with some tuning parameters to the vm system?

Emil

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Application load times
  1999-05-31 19:11 Application load times Emil Briggs
@ 1999-05-31 19:33 ` Matthew Kirkwood
  1999-06-01  0:19   ` Stephen C. Tweedie
  1999-05-31 19:54 ` Andi Kleen
  1999-06-05  6:10 ` Vladimir Dergachev
  2 siblings, 1 reply; 6+ messages in thread
From: Matthew Kirkwood @ 1999-05-31 19:33 UTC (permalink / raw)
  To: Emil Briggs; +Cc: linux-mm

On Mon, 31 May 1999, Emil Briggs wrote:

> Communicator takes 14 seconds to load on a freshly booted system
> On the other hand it takes 4 seconds to load using a program of this sort
> 
>   fd = open("/opt/netscape/netscape", O_RDONLY);
>   read(fd, buffer, 13858288);    
>   execv("/opt/netscape/netscape", argv);
> 
> With StarOffice the load time drops from 40 seconds to 15 seconds.

Drop something bigger into /proc/sys/vm/page-cluster on bootup.

I don't know how much bigger, but I suspect that 16 or 32 (4k pages)
should improve matters on a lightly loaded 64Mb machine.

Matthew.

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Application load times
  1999-05-31 19:11 Application load times Emil Briggs
  1999-05-31 19:33 ` Matthew Kirkwood
@ 1999-05-31 19:54 ` Andi Kleen
  1999-06-05  6:10 ` Vladimir Dergachev
  2 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 1999-05-31 19:54 UTC (permalink / raw)
  To: Emil Briggs; +Cc: linux-mm

On Mon, May 31, 1999 at 09:11:08PM +0200, Emil Briggs wrote:
> Are there any vm tuning parameters that can improve initial application
> load times on a freshly booted system? I'm asking since I found the
> following load times with Netscape Communicator and StarOffice.
> 
> 
> Communicator takes 14 seconds to load on a freshly booted system
> 
> On the other hand it takes 4 seconds to load using a program of this sort
> 
>   fd = open("/opt/netscape/netscape", O_RDONLY);
>   read(fd, buffer, 13858288);    
>   execv("/opt/netscape/netscape", argv);
> 
> With StarOffice the load time drops from 40 seconds to 15 seconds.
> 
> 
> The reason this came up is because I installed Linux on a friends
> computer who usually boots it a couple of times a day to check email,
> webbrowse or run StarOffice -- they immediately asked me why it
> was so slow. Since I know how they usually use their computer it was
> easy enough to remedy this with the little bit of code above. Anyway
> does anyone know if there a more general way of improving initial load
> times with some tuning parameters to the vm system?

The reason is that the read can use the disk bandwidth fully including
read-a-head, which the execv reads the block in the order the functions
which are called at loadup are laid out in the executable. This is especially
bad which C++ programs which usually have small constructors spread out
all over the file, which are called at boot up. The solution are special
programs which rearrange the executable and lay out the function on 
page boundaries to minimize the working set and load time.

These programs exist for most other OS with various names (e.g. pixie on
Irix). Not on Linux yet. Nat Friedman apparently presented a design for
"grope" on the LinuxExpo, but it isn't released yet.

2.2 made program loading already quite a bit faster by introducing readahead
for mmap. 



-Andi
-- 
This is like TV. I don't like TV.
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Application load times
  1999-05-31 19:33 ` Matthew Kirkwood
@ 1999-06-01  0:19   ` Stephen C. Tweedie
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen C. Tweedie @ 1999-06-01  0:19 UTC (permalink / raw)
  To: Matthew Kirkwood; +Cc: Emil Briggs, linux-mm

Hi,

On Mon, 31 May 1999 20:33:54 +0100 (GMT), Matthew Kirkwood
<weejock@ferret.lmh.ox.ac.uk> said:

> Drop something bigger into /proc/sys/vm/page-cluster on bootup.

> I don't know how much bigger, but I suspect that 16 or 32 (4k pages)
> should improve matters on a lightly loaded 64Mb machine.

16 is the default.  The /proc number is interpreted as a power-of-two. 

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Application load times
  1999-05-31 19:11 Application load times Emil Briggs
  1999-05-31 19:33 ` Matthew Kirkwood
  1999-05-31 19:54 ` Andi Kleen
@ 1999-06-05  6:10 ` Vladimir Dergachev
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir Dergachev @ 1999-06-05  6:10 UTC (permalink / raw)
  To: Emil Briggs; +Cc: linux-mm

Take a look at the preload package I wrote some time ago

  http://www.math.upenn.edu/~vdergach/Linux

The long load times are due the fact that the pages are loaded on demand.
Since programs are not likely to just execute linearly there is a lot
of seeking on the disk which slows things down. Note this is still faster
than loading the whole executables. 

Preload reorders loading of files so that the exact parts of the
executable are loaded in the correct order.

I am working on using dentries now to get the information about memory
allocation faster..

                         Vladimir Dergachev

On Mon, 31 May 1999, Emil Briggs wrote:

> Are there any vm tuning parameters that can improve initial application
> load times on a freshly booted system? I'm asking since I found the
> following load times with Netscape Communicator and StarOffice.
> 
> 
> Communicator takes 14 seconds to load on a freshly booted system
> 
> On the other hand it takes 4 seconds to load using a program of this sort
> 
>   fd = open("/opt/netscape/netscape", O_RDONLY);
>   read(fd, buffer, 13858288);    
>   execv("/opt/netscape/netscape", argv);
> 
> With StarOffice the load time drops from 40 seconds to 15 seconds.
> 
> 
> The reason this came up is because I installed Linux on a friends
> computer who usually boots it a couple of times a day to check email,
> webbrowse or run StarOffice -- they immediately asked me why it
> was so slow. Since I know how they usually use their computer it was
> easy enough to remedy this with the little bit of code above. Anyway
> does anyone know if there a more general way of improving initial load
> times with some tuning parameters to the vm system?
> 
> Emil
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
> in the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://humbolt.geo.uu.nl/Linux-MM/
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Application load times
@ 1999-06-01 12:51 Emil Briggs
  0 siblings, 0 replies; 6+ messages in thread
From: Emil Briggs @ 1999-06-01 12:51 UTC (permalink / raw)
  To: linux-mm; +Cc: ak, sct, weejock

> 
>2.2 made program loading already quite a bit faster by introducing readahead
>for mmap.
>                     

Yes it sure does -- the original timings were with a 2.0.36 kernel. I 
upgraded that machine to a 2.2 kernel and did some timings (time
to load netscape on a freshly booted machine).

page-cluster   time
  1            10.62
  2             8.38
  3             7.07
  4             6.4
  5             5.53
  6             5.05
  7             4.78


I used a stopwatch so there is certainly some error in the timings.

Emil

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-06-05  6:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-31 19:11 Application load times Emil Briggs
1999-05-31 19:33 ` Matthew Kirkwood
1999-06-01  0:19   ` Stephen C. Tweedie
1999-05-31 19:54 ` Andi Kleen
1999-06-05  6:10 ` Vladimir Dergachev
1999-06-01 12:51 Emil Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox