Skip to contentSkip to conversation

Application load times

DISCUSSION Emil Briggs 5 participants 5 messages May 31, 1999 – Jun 5, 1999 Memory management

lore
Share & tools
lore
#0 lore raw

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 [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

#1 lore raw
Quoted 8 lines · Emil Briggs

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 [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

#3 lore raw
In reply to Emil Briggs
Quoted 16 lines · Emil Briggs

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.

Quoted 7 lines

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

Signature · 5 lines
This is like TV. I don't like TV.
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to [email protected].  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
#2 lore raw
In reply to Matthew Kirkwood

Hi,

Quoted 4 lines · Matthew Kirkwood

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 [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

#4 lore raw
In reply to Emil Briggs

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

Quoted 24 lines · Emil Briggs

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?

Quoted 7 lines

Emil

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address' in the body to [email protected]. 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 [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/