![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||||
|
SADFL's Commando
![]() |
Prelinking Guide- Make Ubuntu Feel Faster
Disclaimer: Prelinking might break your system! Only consider for use if you can risk the chance that your install might mess up. Most of all make sure that it gets to run the whole thing through the first time you prelink. Stopping in the middle can lead to system failure. Prelinking is a powerful device and needs to be used with care.
Originally written by Jdong. UPDATE 1/2/07: Prelink is no longer necessary in Feisty. Feisty uses a new linking mechanism called DT_GNU_HASH which dramatically speeds up the linking process without the need for continuously running this prelink program. Again, prelink is NOT useful starting from Feisty Reason to use Prelinking (from the Gentoo Linux Prelinking Guide) Most common applications make use of shared libraries. These shared libraries need to be loaded into memory at runtime and the various symbol references need to be resolved. For most small programs this dynamic linking is very quick. But for programs written in C++ and that have many library dependencies, the dynamic linking can take a fair amount of time. On most systems, libraries are not changed very often and when a program is run, the operations taken to link the program are the same every time. Prelink takes advantage of this by carrying out the linking and storing it in the executable, in effect prelinking it. Prelinking can cut the startup times of applications. For example, a typical KDE program's loading time can be cut by as much as 50%. The only maintenance required is re-running prelink every time a library is upgraded for a pre-linked executable. Yet there is a chance that prelinking might mess up something, so use at your own risk. How to enable prelink 1. Activate Ubuntu universe sources 2. Put this command into terminal to install Prelink: Quote:
3. Now put this command into the terminal: Quote:
5. Adjust the other options if you know what the heck you're doing. If it looks foreign to you, the defaults work well. 6. To start the first prelink (the longest one!), put this in terminal: Quote:
One problem with prelinking in that when you install new programs those programs are not prelinked. So to avoid this problem when installing programs with apt-get or synaptic, use the directions below. 1. Put this in terminal: Quote:
Quote:
General Notes About Prelinking In the future, prelink performs a quick prelink (a less-than-1-minute procedure on most systems) daily, usually at midnight. Every 14 days, or whatever you changed it to be, a full prelink will run. If you just did a major apt-get upgrade that changed systemwide libraries (i.e. libc6, glibc, major gnome/X libs, etc etc etc) and experience cryptic errors about libs, rerun step 6. To undo prelink, change step 4 from yes to no, then rerun step 6. Prelinking will make the binaries it prelinks change, so it's not appropriate if you have tripwire or another checksum-based IDS system, or if you do incremental or differential backups to save on space.
__________________
Quote:
Last edited by jdong; January 2nd, 2007 at 01:32 PM.. |
||||||
|
|
|
|
|
#2 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2005
Location: Saint Paul, MN
Beans: 2,903
|
Re: Prelinking Guide- Make Ubuntu Feel Faster
Quote:
Breezy amd64 does not appear to have an apt.conf file. I did, however, find a /etc/apt/apt.conf.d directory that has similar scripts. I created a new script called S99prelink and that appears to do the trick. Last edited by mlomker; October 11th, 2005 at 08:43 PM.. |
|
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Jun 2005
Beans: 18
Ubuntu 9.04 Jaunty Jackalope
|
I have a question. Eventhough prelinking sonds like a miracle tweak that would speed up most applications; since you noted to use this prelinking at one's own risk, I was wondering if prelinking would affect the stability of the whole operating system negatively? I remember reading a similar thread for hoary but didn't perform the changes. I am asking this because if it can speed up the system why isn't the ubuntu gets installed prelinking enabled off the bat and I would prefer the stability of ubuntu over the performance under any condition. So please comment about this if you have experience from hoary or breezy's preview release. Thanks
Last edited by ubunxpm; October 13th, 2005 at 10:39 AM.. |
|
|
|
|
|
#4 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Aug 2005
Location: Saint Paul, MN
Beans: 2,903
|
Re: Prelinking Guide- Make Ubuntu Feel Faster
Quote:
|
|
|
|
|
|
|
#5 | |
|
5 Cups of Ubuntu
![]() Join Date: Jun 2005
Beans: 18
Ubuntu 9.04 Jaunty Jackalope
|
Re: Prelinking Guide- Make Ubuntu Feel Faster
Quote:
Last edited by ubunxpm; October 13th, 2005 at 10:49 AM.. |
|
|
|
|
|
|
#6 | ||
|
SADFL's Commando
![]() |
Re: Prelinking Guide- Make Ubuntu Feel Faster
Quote:
__________________
Quote:
|
||
|
|
|
|
|
#7 |
|
Way Too Much Ubuntu
![]() |
Re: Prelinking Guide- Make Ubuntu Feel Faster
I started prelinking a few weeks ago in Breezy, the major differnece I felt was in opening OO.org apps for the first time, Writer went from ~10sec to 3-4sec, same for the rest OO.org, and Gimp.
Great tutorial poofyhairguy/jdong.
__________________
Ubuntu Gutsy Gibbon 7.10 AMD 64 3000+ / 2 GB RAM / nVidia 6200 @ 1600*1200 on ViewSonic E790 Storage: (120+200+[400+400]+400+750) GB = 2270 GB |
|
|
|
|
|
#8 |
|
A Carafe of Ubuntu
![]() Join Date: Sep 2005
Beans: 42
|
Re: Prelinking Guide- Make Ubuntu Feel Faster
i can def see a dif in oo.org yayy thanks for the great tutorial
|
|
|
|
|
|
#9 |
|
5 Cups of Ubuntu
![]() Join Date: Sep 2005
Location: MD
Beans: 20
|
Re: Prelinking Guide- Make Ubuntu Feel Faster
Same here - improvement in apps like OOo and Gimp. That's enough for me - I don't need gaim to load faster, for example, because its already pretty quick - what makes this worthwhile is the savings on the larger apps. Great guide, thanks.
|
|
|
|
|
|
#10 | |
|
Gee! These Aren't Roasted!
![]() |
Re: Prelinking Guide- Make Ubuntu Feel Faster
Quote:
Cheers.
__________________
"I'm just sittin' here watchin' the wheels go 'round and 'round" John Lennon
|
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|