Optimize ubuntu boot sequence by profiling it
- While you are in grub menu highlight your preferred kernel version and press "e".
- Highlight the line beginning with kernel and press "e" again. Press End key in order to goto end of that line.
- Add a word "profile" without quotes to that line and press Enter.
- Now press "b" to continue booting.
Any executable that makes heavy use of shared libraries can benefit from prelinking. Prelinking resolves addresses of shared libraries in advance this reduces number of relocations.
Prelink is also useful in the context of security since we can tell prelink to make libraries load at random addresses until next run of prelink. This is useful since libraries won't load at fixed addresses on every system.
You can install prelink by issuing following command.
sudo apt-get -y install prelinkChange a line inside the configuration file /etc/default/prelink from
PRELINKING=yesWe will do our first prelinking by executing following command
Thats it you don't have to do anything else. Prelink daemon will run periodically to optimize your newly installed executables.
Preload is a little application that monitors files of frequently used applications and and loads them in to the memory when system is idle. This usually results in lesser startup times for those applications. Install preload by executing following command.
sudo apt-get -y install preload
deborphan: Find orphan packagesAfter doing several installs and removes apt leaves lot of packages that are not needed anymore. You can find these packages using deborphan. Install deborphan by issuing following command.
sudo apt-get -y install deborphanNow to see the list of packages which are not needed anymore just run following command.
deborphanTo remove these packages give following command.
sudo apt-get remove `deborphan`To get full list of packages that are not essential for functioning of the system execute the following command.
deborphan --guess-allThis command will list data,dev and many other types packages that are not essential for system functioning. Please see man page of deborphan to find out more options.
localepurgeRemove locale information(language tables) of the applications that are not needed for you. localepurge maintains specified locales and removes the remaining. To install localepurge issue following command.
sudo apt-get -y install localepurgeDuring installation localepurge will ask you to select locales that you want to preserve. At this step select what you need and press OK. From now on localepurge will maintain only those locales which you selected during configuration step.
from ubuntu snippets