They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
trollboy
Score: 59
votes: 65
Format: Article

 How to make software open much faster


As an impatient S.o.B. with the attention span of a hyperactive mayfly, one of my bugbears with Linux, specifically Linux Mint Debian Edition in my case, is how long some applications take to start up when I select the menu option. On my laptop for example, Libre Office Writer takes over twenty five seconds. That doesn't sound like a huge amount of time and in the grand scheme of things it probably isn't; but it feels like an eternity when you are waiting for an application to open.

If you want to find out how long twenty five seconds actually is, try the following, simple experiment.

Get into your car at 3am and drive around a quiet neighbourhood. Give a blast on your horn that lasts for twenty five seconds. You will be truly amazed at how long it is!

Seriously, don't do that as depending on the neighbourhood, you may get into trouble with the law, or shot or both!

LibreOffice writer now starts up on my laptop in less than five seconds and most other programs have had a similar boost. And it was easy to achieve.

When starting any Linux application, the biggest chunk of time by far is spent working out which shared libraries are needed by the application and which are needed by those and so on and so on. What we need then is a way to speed up or avoid this process. Fortunately, there is a wonderful utility called prelink which will do the job perfectly.

The following is how I set it up in LMDE; the process should be the same in the other Mint editions as I know it works the same for Xubuntu.

  1. Install prelink by opening a terminal and running the command "sudo apt-get install prelink" acceptting any dependencies. You don't need the quotes.
  2. Turn on prelinking by editing /etc/default/prelink as root and changing the line that says PRELINKING=unknown to PRELINKING=yes
  3. Initialise the prelink databse by running the command "sudo /etc/cron.daily/prelink" in a terminal. This will take quite a while to complete but thereafter will update very quickly every day. Once again, you don't need the quotes around the command.

That's it! It really is that easy.


Tags: speed loading software
Created: 3 years ago.
Last edited: 3 years ago.
Reviewed: 3 years ago.
Read 1492 times.

Comments
4 weeks ago

1OfUs
EXELENT !!!
Do I must start command "sudo /etc/cron.daily/prelink" every time when Im login to os?
 
5 months ago

cyberschelm

Woot, thanks! My libreOffice stuff and firefox open in 2 secs now :)
 
7 months ago

Tiens
Wow this made a huge difference thanks!  
1 year ago

powerhouse
Thanks, even on an already fast machine I was able to speed up some applications, notably gimp. Great advise!  
2 years ago

Gabor
Workaround for the '134' bug:
1. sudo chmod 666 /etc/prelink.conf
2. sudo prelink -amvR
3. take the program from the last 'Prelinking ...' output before it crashed and
sudo echo '-b /path/to/program' >> /etc/prelink.conf
4. repeat 2 and 3 until it runs through
 
2 years ago

trollboy
james3mc: It means it can't link that item. It should be OK to ignore  
2 years ago

trollboy
hithirdwavedust:I have opuntia but not specifically the prickly pear. On your main question, I have no idea I'm afraid but I thought it generated on disk tables of links  
2 years ago

hithirdwavedust
This is incredibly interesting; do you know of any security ramifications of prelinking? Also, does the linking reside in main memory as the machine runs?

On a totally different subject, do you have a prickly pear in your collection of cacti?
 
2 years ago

james3mc
On my system, initialise eventually fails. My prelink log ends with this ...

2012-02-10 09:35:37 prelink: /usr/bin/mplayer: Cannot prelink against non-PIC shared library /usr/lib/i686/cmov/libpostproc.so.52
prelink.bin: ../../src/conflict.c:763: prelink_build_conflicts: Assertion `j < ndeps' failed.
Prelink failed with return value 134

Any ideas what this actually means?
James
 
2 years ago

Boringbytes
I followed your recommendation for helping applications open faster.
While some applications were not noticeably affected, others, like LibreOffice, and Gimp showed a drastic improvement in start-up speed. Following the steps in your tutorial it was easy, and fast to set up prelinking.
 
2 years ago

hitchawk
Thanx for the Tutorial, I have carefully followed the steps,but have encountered this problem and would like to ask if anyone can tell me what is going wrong, and how i can correct it.

bilbo@bilbo-laptop ~ $ sudo /etc/cron.daily/prelink
[sudo] password for bilbo:
/etc/cron.daily/prelink: line 55: 1682 Aborted /usr/sbin/prelink -a $PRELINK_OPTS >> /var/log/prelink.log 2>&1

Many thanks :)
 
3 years ago

brenlla
On my LMDE 1109 I have problems. Here is my prelink.log:
/usr/sbin/prelink -a -mR -T -f
2011-12-14 05:15:35 prelink: /usr/lib/icedove/icedove-bin: Could not find one of the dependencies
2011-12-14 05:15:35 prelink: /usr/lib/klibc/bin/losetup: Using /lib/klibc-gj8Lrm8UlC498y56mvS0YY96gps.so, not /lib/ld-linux.so.2 as dynamic linker
2011-12-14 05:15:35 prelink: /usr/lib/klibc/bin/dmesg: Using /lib/klibc-gj8Lrm8UlC498y56mvS0YY96gps.so, not /lib/ld-linux.so.2 as dynamic linker
(...)
2011-12-14 05:15:35 prelink: /usr/lib/klibc/bin/reboot: Using /lib/klibc-gj8Lrm8UlC498y56mvS0YY96gps.so, not /lib/ld-linux.so.2 as dynamic linker
2011-12-14 05:15:39 prelink: /usr/lib/libbonobo-activation.so.4.0.0: Not enough room to add .dynamic entry
2011-12-14 05:15:44 prelink: /usr/sbin/chat: DT_JMPREL tag not adjacent to DT_REL relocations
2011-12-14 05:15:59 prelink: /usr/sbin/pppoe-discovery: DT_JMPREL tag not adjacent to DT_REL relocations
prelink.bin: ../../src/conflict.c:763: prelink_build_conflicts: Assertion `j < ndeps' failed.
Prelink failed with return value 134
== ==
Thank you in advance for any kind of help.
 
3 years ago

Anleoje
How I check if prelink is working on my machine?  
3 years ago

Anleoje
Thank you ;)  
3 years ago

m4daredsun
Does anybody know what to choose between prelink and preload?

I am rather fine with preload, but the price to pay in terms of boot time is very high
 
3 years ago

niebling
All commands worked w/o a fuss. Will report back if noticeable improvement.  
3 years ago

ecordero
Thanks for the info! Very helpful!  
3 years ago

dagon
Works well. Thanks!  
3 years ago

trollboy
@pnin: I think ureadahead is purely for boot speed.

From the Arch Wiki which is a damn good source of Linux info

Ureadahead (Über-readahead) is used to speed up the boot process. It works by reading all the files required during boot and makes pack files for quicker access, then during boot reads these files in advance, thus minimizes the access times for the harddrives. It's intended to replace sreadahead.
 
3 years ago

pnin
Pardon my noobiness, but something itches me about this tip: is it compatible with the current (July-11) default implementation of ureadahead, or does the later make prelink redundant?

If not, why isn't prelink installed and activated by default, at least in LM LXDE, considering it sees a lot of older hardware, and this could mean a world of difference?
 
3 years ago

wyrdoak
I've been using both, prelink and preload, seems to be working great.

Desktop comes a little slower on boot, but much better when working on the desktop.
 
3 years ago

blueXrider
This also works with network files.
Very good Trollboy you get a cookie today and a mint on your pillow.

 
3 years ago

900i
Well done that man, made my ssd even faster.  
3 years ago

JarlArntzen
Hm. Now I'm not sure. I ran prelink and especially OOo *does* seem faster. Starts in 2 sec.

Then I ran [ sudo prelink -ua ] to undo the prelinking again but this results in a long list of shared files which it can not find.

After rebooting I tried starting OOo writer: The first start takes about 4 seconds, all subsequent starts take 2 seconds. I never timed the starts before, but, like I said, it seems a lot faster.

I'm going to test this on a slower computer now.
 
3 years ago

JarlArntzen
Right. Thanks for a great tip anyway. OpenOffice.org Writer starting up in 2 seconds! Down from 4 :) I need to try this on a slower computer. Thanks!  
3 years ago

trollboy
Why is it not included? I don't know.
Are there any drawbacks? I haven't encountered any yet. That doesn't mean I never will ;)

When I do an upgrade, I tend to automatically run the prelink cron script afterwards.
 
3 years ago

JarlArntzen
How come this is not integrated in all distros by default? What are the drawbacks, caveats and known issues?

Would this fail when I upgrade applications to a new version, which may rely on different dependencies than the previous version?

Seems like an excellent tool anyhow, trying it out now :)
 
3 years ago

mikefreeman
This is very good! Thank you!  
3 years ago

wanda
Libreoffice Writer 4 seconds.  
3 years ago

Alexio
Useful tutorial, thank you!  

Other tutorials from trollboy