In any operating system there are the settings which change lead to its acceleration. Settings by default usually are always conservative, as their appointment to work at the majority of computers. If to understand that you get and that you lose, changing these or those settings, it is possible to achieve essential acceleration of work of Ubuntu and appendices. You won't find tests which quantitatively would specify on how many quicker in article there were these or those operations or appendices, that is empirical advice which you should apply and watch with care changes and consequences in your system are given.
I apologize in advance for the automatic translation of an article from the Russian language. I hope that by understanding the trick, you will find a more detailed answer in their native language.
You can visit the original article and read Speed up Ubuntu in their own language, with the help of online translators.
Table of contents
Fast boot Ubuntu
Disable Compiz
Speed up GTK
Optimization Gnome
System menu Gnome
Speed up Unity
Speed up Qt
Speed up KDE
Acceleration of the Ubuntu programs by means of preload
The correct conversion of the computer name
Total cleaning and re-indexing Sqlite
Fast Epiphany
Creating a cache
Swap Ubuntu
Optimization XML files Ubuntu
Quick Start OpenOffice, LibreOffice
Compose cache
Speed up Xorg
Priority Xorg
Disable Phishing Filter to speed up Mozilla Firefox
The acceleration of the file system
The acceleration of the font server
Conclusion
It is necessary to replace in /etc/initramfs-tools/initramfs.conf the line MODULES=most with MODULES=dep and to cause sudo update-initramfs -k all -u
. Further, in case of appearance of new kernels assembly of initramfs will be occurs automatically and not to require additional commands.
So if you have a laptop and / or stationary PC, which you do NOT reboot / shutdown, and translate into sleep mode, you should not use this option. To add the noresume parameter it is possible in GRUB2 in file /etc/default/grub, having changed the GRUB_CMDLINE_LINUX_DEFAULT variable. Don't forget to apply change by sudo update-grub
command.
You can speed up the system by doing the following trick. Change to the /etc/init/ureadahead.conf line
exec /sbin/ureadahead --daemon
on the line
exec (/usr/bin/ionice -c 3 /sbin/ureadahead --daemon)&
run process in background using the & and the lower the priority of a file to idle, to readahead gave another process starts.
sudo update-grub
.
sudo nano /etc/default/grub
, look for the line and adds the option GRUB_CMDLINE_LINUX_DEFAULT ipv6.disable=1. Save changes and exit. sudo update-grub
. Reboot.
sudo nano /etc/default/grub
, and look for the line GRUB_HIDDEN_TIMEOUT GRUB_TIMEOUT and reduce to a reasonable value. GRUB_HIDDEN_TIMEOUT responsible for the delay of the menu when you have an Ubuntu operating system on your computer. GRUB_TIMEOUT responsible for the delay, if multiple operating systems. Do not forget to sudo update-grub
.
cd /etc/xdg/autostart && sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop
Now the startup will be a lot more points and very carefully, knowing their actions, can be excluded from startup those programs that you do not need.
These following tips are very dangerous because of the removal procedure or off. If afraid, it is better not to use these tips.
We will remove unnecessary packages that run as daemons, and thus slow down the booting Ubuntu. Remove the packages in order to accelerate boot Ubuntu, and not to free up disk space.
The concept of the desired / not desired depends on the person, be careful and think many times, but not useful if tomorrow, what came to remove today.
Given the team finished with a key --simulate, which just shows you what will be done, but it will not do.
Delete key --simulate, think about the consequences of this and run without the --simulate - leave it to your conscience.
It is better to remove packages via Synaptic, more comfortable to see and to repeal affected depending on the action, if the dependencies will be deleted as necessary. While I check my advice, but in the future all can change and I have no crystal ball for this situation.
sudo apt-get --simulate purge timidity timidity-daemon
sudo nano /etc/default/avahi-daemon
and set AVAHI_DAEMON_DETECT_LOCAL=0
Compiz - composite window manager for X Window System, which uses 3D graphics acceleration for OpenGL. Compiz required with the release of Ubuntu 11.04. Compiz has a lot of new graphical effects that are available in all graphical environments, X Window, including GNOME and KDE. If you have installed the drivers for your video card, most likely, Compiz is turned on.
After some time, "burning" window bored and thought comes simplify Compiz or turn it off completely. If you want to simplify the effects, you need to install compizconfig-settings-manager via Synaptic or Terminal sudo apt-get install compizconfig-settings-manager
. Through the CCSM (compizconfig settings manager) you can get access to features and ease Compiz effects to your taste.
If you want to just disable Compiz, it can be done through the Menu - System - Preferences - Appearance - Visual Effects = None. Each will have its pros and cons of Compiz. Personally, I disabled Compiz discovered that my nVidia graphics card with Compiz enabled in the "Performance on Demand" is constantly running at full load and is not going to slow down the fan speed.
Many people know that in Ubuntu the important role played by GTK. Changing settings GTK, we affect all applications using the GTK library. We will change the following parameters responsible for the delay (pause):
Start Gedit and paste the following lines:
gtk-menu-popup-delay = 0
gtk-menu-popdown-delay = 0
gtk-menu-bar-popup-delay = 0
gtk-timeout-expand = 0
gtk-timeout-initial = 0
Save in your home directory named ".gtkrc-2.0"
Now you can log out of Gnome and back in again, fast movement in a variety of menu should be your reward.
Disadvantages: you may have to disable Compiz, which covers some of the parameters. Disable Compiz may Menu - System - Preferences - Appearance - Visual Effects = None.
gconftool-2 --type bool --set /apps/metacity/general/reduced_resources true
gconftool-2 --get /apps/metacity/general/reduced_resources
gconftool-2 --type bool --set /apps/panel/global/enable_animations false
gconftool-2 --get /apps/panel/global/enable_animations
gconftool-2 --type bool --set /desktop/gnome/interface/accessibility false
gconftool-2 --get /desktop/gnome/interface/accessibility
gconftool-2 --type string --set /apps/panel/global/panel_animation_speed panel-speed-fast
gconftool-2 --get /apps/panel/global/panel_animation_speed
gconftool-2 --type integer --set /apps/metacity/general/auto_raise_delay 100
If set to true, and the focus mode is either "sloppy" or "mouse" then the focused window will be automatically raised after a delay specified by the auto_raise_delay key. This is not related to clicking on a window to raise it, nor to entering a window during drag-and-drop. Get the value in Terminal, you can use gconftool-2 --get /apps/metacity/general/auto_raise_delay
First you need to build the indexes, then the themes showed the fastest rate.
Apply the commands in Terminal:
for d in ~/.icons/*; do gtk-update-icon-cache -f $d; done
for d in /usr/share/icons/*; do sudo gtk-update-icon-cache -f $d; done
sudo fc-cache -fv
fc-cache ~/.fonts
Rebuilding indexes, better log off Gnome and go again without running unnecessary programs.
Need to know what themes quickly render window and choose from the fastest set. Create a help file and fill the
contents:
#!/bin/bash
clear
for d in ls /usr/share/themes/*; do
metacity-theme-viewer `basename "$d"`;
echo "-----------------------"
done
exit 0
Make an executable script and run in Terminal. You are coming with a preview window theme, you should close it.
You should carefully review the output and choose the fastest theme, paying attention to the time of drawing. The smaller the number, the faster the drawn window. And since the windows are drawn ever-millisecond, then the computer it will be a relief.
Choose your top three speed drawing. Using metacity-theme-viewer NameTheme
or the "Appearance" apply a theme that you like.
After restarting the computer, everyone can watch the Gnome menu system at the first reference to it, opens reluctantly. Accesses the menu icons and the actual construction of the menu, which causes a delay when you first open, the next opening the system menu as you have seen many, there is no time.
To accelerate the discovery of the System menu for the first time - we will create a script that presses Alt F1 after a reboot. The keyboard shortcut Alt F1 is reserved by default for opening the system menu using the keyboard. If you change the combination to another, you have to change the script.
Take the following steps:
sudo apt-get install xmacro
#!/bin/sh
find /usr/share/pixmaps/ -type f| xargs -0 cat > /dev/null
echo "Delay 1\n
KeyStrPress Alt_L\n
KeyStrPress F1\n
Delay 2\n
KeyStrRelease Alt_L\n
KeyStrRelease F1\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
KeyStrPress Down\n
KeyStrRelease Down\n
Delay 2\n
KeyStrPress Escape\n
KeyStrRelease Escape"|xmacroplay ":0.0"
exit 0
chmod +x ~/bin/fast_menu.sh
Disadvantages: The method works well with the automatic logon to the system that is turning your computer, you get ready to have a desktop pop-up menu. If you do not have automatic entry, the method is bad for you and you will have after logging in, witness the magic in the form of self-opening the menu and run the focus of the menu. It is also possible to calculate the net, what if you decide to edit the keystrokes in the script, you can get lost in the Hitting (KeyStrPress) and release (KeyStrRelease) keys, which can lead to temporary wildness keyboard in the system.
Install compizconfig-settings-manager.
Run CCSM (Compiz Configuration Settings Manager - ccsm) and go to the OpenGL Plugin, which turn off the "Sync to VBlank".
Go to the Composite and disable "Detect refresh rate".
Turn off the Animations plugin under Effects.
If you are not using the sensor device, then unplug the plug Unity MT Grab Handles.
In General - General Options set the "Ping Delay" in 2000.
Try Unity2D without 3D effects.
In the world of *nix is traditionally believed to Gnome - this is GTK, and KDE - is Qt, but the user does not interfere with any program to run GTK in KDE, and Qt program in Gnome. Even more! The authors of Gnome and KDE have done a lot to look "not native" programs look just like home "program".
We now consider how to accelerate the launch of programs written using Qt in Gnome. But in the beginning need to understand that a program written in Qt can not depend on KDE, and may additionally take advantage of KDE. These are dependent on the KDE program, with its starting to get a "minimum set of KDE".
How do I know which programs depend on KDE? In Ubuntu, the default desktop environment Gnome and programs that you installed the developers, most use GTK and Python. Qt software is likely to set you already own. If you remember what programs are installed yourself, you can find them in the Sinaptic by name and make sure to read the description of the program and look into depending on the program.
In Synaptic, call the File menu - History, which will remind the chronology of events. If you call the command in Terminal sudo aptitude search '~i!~Nlib(~Dqt|~Dkde)'
, it will remind the packages are installed (~i) It is not a library (!~Nlib) And the dependency is Qt (~Dqt) or based is KDE (~Dkde). These programs are likely to benefit from this method.
Pre-launch "a minimum set of KDE", we get to the start of the acceleration of many Qt programs. To do this, add "Startup Applications" run the program /usr/bin/kdeinit named FastQt. After the computer restarts, your Qt programs will start faster, because they do not need to run additional "minimum set of KDE".
Disadvantages: adding an extra entry in the «Startup Applications» slow computer start time. The gain in speed run Qt applications is achieved through the library held in the memory of KDE, running in advance. If you have enough RAM, then this tip will help you. If the RAM is small, then use the Ubuntu only gtk program. Avoid installing qt programs, often beginning with the letter K.
Configure your Desktop > Look&Feel > Appearance > Windows uncheck "Enable Animations"
Configure your Desktop > Look&Feel > Desktop Effects > Advanced. Uncheck "Use Vsync".
Configure your Desktop > Look&Feel > Desktop Effects > Advanced. Change “Compositing Type” to Xrender. This will change it to 2D compositing. If this option is checked you only need good 2D acceleration to run Desktop Effects, but It will disable a few effects that require 3D acceleration.
Configure your Desktop > Look&Feel > Appearance > Style > Fine Tuning. Change "Graphical Effects" to something of your choice
(Low display resolution and Low CPU is the fastest).
Turn off animations in the oxygen style. Configure your Desktop > Look&Feel > Appearence > Style > Configure. Uncheck "Enable Animations".
Preload - the daemon that runs in the background, which collects information on the most frequently used programs, caches them, and they use the library, which increases the speed of loading programs. You simply set the preload sudo apt-get install preload
in the terminal or use Synaptic and preload it to find and install it.
Preload the default settings are suitable for most, so any change in the file /etc/preload.conf not required.
If you have a SSD drive, which as we know there is no spinning disks and read heads, it is desirable, in the /etc/preload.conf change the parameter sortstrategy = 0. In this way you order is not to sort the request queue, because the SSD does not make sense. Restart the preload - sudo /etc/init.d/preload restart
Disadvantages: If you do a little RAM, then maybe you should not set preload. Let your computer is in "run the program - worked - closed the program and cleared the memory"
When you install Ubuntu on your computer you specify the computer name. Many users do not have a local network of the domain name. Home users who do not have a network, it is unlikely involved in setting their DNS server.
Many programs will need to resolve the computer name to an IP address - this is called "hostname resolution". If a resolve fails, then there are the unnecessary time outs. Run the command in Terminal nslookup `hostname`
. If your computer name could not properly resolve to the IP address, you must do the following:
sudo gedit /etc/hosts
nslookup `hostname`
Disadvantages: You are editing a system file, which requires caution. It is desirable to change system files, make backup copies of them to be able to roll back the changes.
Many of the programs in Ubuntu store data in databases, rather than in text files. Often used as a database management system (DBMS) Sqlite. Sqlite can be made by means of cleaning the empty entries, and re-creating indexes. The best option would be to create a script containing calls to Sqlite, to run periodically from time to time. And so:
sudo apt-get install sqlite3
#!/bin/bash
find ~/ -size +100k -type f -print0 | \
while read -d '' FILE; do
abs_file_name=$(readlink -f "$FILE")
headfile=`head -c 15 "$abs_file_name"`;
if [ "$headfile" = "SQLite format 3" ]; then
file_size_do=`du -b "$abs_file_name"|cut -f1`;
sqlite3 "$abs_file_name" "VACUUM; REINDEX;" > /dev/null 2>&1
file_size_posle=`du -b "$abs_file_name"|cut -f1`;
echo "$abs_file_name";
echo "Size BEFORE $file_size_do";
echo "Size AFTER $file_size_posle";
echo -n "percent "
echo "scale=2; ($file_size_posle/$file_size_do)*100"|bc -l
fi
done
sleep 2
exit 0
chmod +x ~/bin/optimizer.sh
sudo /etc/init.d/gdm stop
sudo /etc/init.d/kdm stop
sudo /etc/init.d/ldm stop
~/bin/optimizer.sh > ~/report_sqlite_shrink.txt
sudo shutdown -r +0
From this trick will benefit KDE users and Google Chrome. They recommend this tip.
If you installed the Epiphany browser on Ubuntu via Synaptic or sudo apt-get install epiphany-browser
, then we can speed up the launch of Epiphany in the system. To do this, "Startup Applications" add "/usr/bin/epiphany --no-window" under the name FastEpiphany.
Adds efficiency trick - preload. The trick is that when you start Ubuntu, we run the web browser Epiphany, which is not visible due to the parameter "--no-window". Subsequent launches browser Epiphany would be fast, since the kernel of Epiphany is already in memory.
Disadvantages: adding an extra entry in the "Startup Applications" slow computer start time.
GTK can use the cache files created by gtk-update-icon-cache to avoid unnecessary system calls and disk when running applications. Since the format of the cache files allows them to share between multiple applications (mmap ()). The total memory consumption is also reduced. It remains to periodically run a script that calls gtk-update-icon-cache and create a cache to speed access to the icons.
Call the same time fc-cache, which creates a description of the fonts. We created a file in optimizer.sh Total cleaning and re-indexing Sqlite. I advise you not to create a new script, just open the file ~/bin/optimizer.sh in Gedit and add lines to the file:
# update icon cache in the home folder
for d in ~/.icons/*; do gtk-update-icon-cache -f $d; done
# update icon cache on the system
for d in /usr/share/icons/*; do sudo gtk-update-icon-cache -f $d; done
# Update the font cache
sudo fc-cache -fv
fc-cache ~/.fonts
In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. The main advantage of paging over memory segmentation is that it allows the physical address space of a process to be noncontiguous. Before the time paging was used, systems had to fit whole programs into storage contiguously, which caused various storage and fragmentation problems.Paging is an important part of virtual memory implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical random-access memory (RAM).
It is necessary that the computer had enough memory for your applications. The idea is trivial, but it is. Change the behavior of Ubuntu on the use of RAM and swap space. There is an option vm.swappiness, which defaults to 60, and controls the percentage of free memory, in which will reset the active page in the section swap.
In other words, at 100 - 60 = 40% of used memory, Ubuntu will have use partition swap. With a large amount of RAM in your computer, it is better to change the vm.swappiness = 10. Thus, to order Ubuntu does not use the swap until the RAM will not be occupied by 100 - 10 = 90%.
In Terminal sudo gedit /etc/sysctl.conf
add to the file vm.swappiness = 10
Save your changes and reboot.
Disadvantages: you are editing a system file and requires caution. It is advisable to make a backup copy of the file, for example sudo cp /etc/sysctl.conf /etc/sysctl.conf.backup
In structured XML files, many programs in Ubuntu store settings and data. Often these files are readable format, even though the person they are rarely read. It is possible to convert the XML files in readable format to a format understood by the person comfortable computer.
These transformed XML files are loaded faster and less memory is occupied. To help you in this transformation, written scripts, which can be found by the name of desktop-optimizations.tar.gz.
Next, unpack the archive desktop-optimizations.tar.gz and run scripts at a time from your account:
If the system has multiple accounts, then the scripts rhythmbox-quickstart and gconf-optimize, to run on each account. Nothing bad will happen if you run the script several times.
It is advisable to restart your computer.
Disadvantages: scripts to optimize the files in your home directory, and system files by querying privileges via sudo. Although scripts do backups, but if you have a lengthy operation will reboot the computer from the mains failure, the results may be ambiguous and disappointing.
If you use the office suite OpenOffice, LibreOffice and your computer has more RAM, you should use the "QuickStarter". This option displays an icon in your notification area, through which you can quickly get access to OpenOffice.
Also in memory is the core will OpenOffice and launch programs from the package will be much faster than without the "QuickStarter". To enable "QuickStarter" Writer and run in the menu Tools - Options - Memory enable the "Enable systray QuickStarter".
Immediately set the "Number of Steps" = 10. "Number of Steps" the number of cancellations that OpenOffice will remember. Less number of steps = less occupied memory.
In the menu Tools - Options - Java, you can disable the use of Java in OpenOffice, LibreOffice and thus reduce the consumption of memory and speed up OpenOffice, LibreOffice, but you lose the following:
Disadvantages: "QuickStarter" a little slow start your computer.
Create an empty directory
mkdir ~/.compose-cache
Your Qt / GTK programs will be a bit quicker start and consume less memory, because libX11 will be created in ~/.compose-cache caches the information and use it again.
Using this trick is only recommended for experienced users. Always make a backup copy of the file /etc/X11/xorg.conf. Use the tips one by one and carefully test and check the time stability of Xorg after the change.
Section "Device"
...
Option "RenderAccel" "true"
...
EndSection
Section "Device"
...
Option "AllowGLXWithComposite" "true"
...
EndSection
Section "Device"
...
Option "BackingStore" "true"
...
EndSection
The trick to speed work in Ubuntu by raising the priority of Xorg. Tip suited to users Ubuntu (Gnome), and kUbuntu (KDE). The priority is changing the command renice. It must be remembered that from 0 to -19 priority increases. From 0 to 19 priority decreases. In our case, we change the priority of Xorg from 0 to -5.
sudo renice -n -5 $(pidof X)
If you want to reboot your PC Xorg was already a high priority, then you can put in the Startup Applications gksu /path/to/script in Gnome and kdesudo /path/to/script in KDE.
You can command "renice -n -5 $(pidof X)" placed in the /etc/rc.local, and it will be executed as root and after loading Xorg.
WARNING! If you do not know what phishing is and how to protect themselves from online threats, you should not read further and use this tip! Phishing - a way to cheat you when you are given a direct link to the site that looks indistinguishable from a real or a reference is similar to a known resource.
Once on this site, you can report scammers valuable information to gain access to accounts and bank accounts. To protect against phishing major vendors of Internet browsers have agreed to apply the same methods of informing users that they have opened a suspicious site, which may belong to the fraudsters. New versions of browsers already have this capability - "Anti-Phishing".
Phishing Filter - a protection that is never superfluous. Phishing Filter - is an additional concern for you. But if you are in control, for example, you have the NoScript plugin for Firefox, which protects you at unknown sites. Or you observe a network's security, then you may want to accelerate Firefox, the cost of removing and reducing anti-phishing security.
The acceleration is achieved by ensuring that each URL is checked against the database of phishing addresses.
To speed up Firefox, the method of disabling Anti-Phishing, do the following:
ls -laF ~/.mozilla/firefox/*.default/urlclassifier*
rm -i ~/.mozilla/firefox/*.default/urlclassifier*
ls -laF ~/.mozilla/firefox/*.default/urlclassifier*
Disadvantages: you delete a file Firefox in your home directory and it is desirable to make a backup copy of the profile Firefox.
In this tip, we'll change the settings on file systems. This trick is strongly recommended to users with an Uninterruptible Power Supply (UPS).
In Linux you can use a variety of file systems, and each has its own parameters that affect performance. Specify the options you need can be carefully editing the file /etc/fstab
Parameters for improve performance of file systems:
barrier = 0 - we accelerate the write operation to the partitions ext4.
relatime – A filesystem mount with this option causes the access time to be updated if they are (before the update has occurred) earlier than the modification time. This significantly cuts down the writes caused by atime updates.
I recommend using relatime.
"data=writeback" provides the highest performance of ext4. To change "ordered" in less secure, but the speed "writeback" should ALWAYS unmount the partition and perform sudo tune2fs -O has_journal -o journal_data_writeback /dev/name_device
. Need to do a background check partition for errors sudo fsck /dev/name_device
. This article does not and should not be regime change journaling for the root partition /.
nobarrier - we accelerate write operations on btrfs.
relatime – A filesystem mount with this option causes the access time to be updated if they are (before the update has occurred) earlier than the modification time. This significantly cuts down the writes caused by atime updates.
I recommend using relatime.
If your machine has a reliable power supply (for example because you have a UPS or because your laptop has a battery) and doesn't crash much, you can increase this time so that the VM subsystem can do a better job optimizing the IO, as well as having the disk (and the SATA link when using ALPM) in lower power states for a longer period of time.
Increase the time between the discharge of "dirty" buffers vm.dirty_writeback_centisecs in /etc/sysctl.conf.
I recommend using vm.dirty_writeback_centisecs = 15000
mail.err /var/log/mail.err
mail.err -/var/log/mail.err
In X.org is a subsystem dedicated to fonts. A large number of fonts, weights, and slows down the system as a whole.
If you do not speak Indian, Korean, Laos, Khmer, then you can safely delete these languages from your system.
sudo apt-get purge ttf-indic-fonts-core ttf-kacst-one ttf-khmeros-core ttf-lao ttf-punjabi-fonts ttf-unfonts-core
For a refreshing effect it is recommended to make:
sudo fc-cache -fv; fc-cache ~/.fonts
I will tell my subjective opinion: no one magic button that speeds up Ubuntu. There is a small "screws" that if the "tweak" will increase in speed.
If your PC hardware is obsolete, the way out of this situation will off unnecessary elements and simplify everything.
If your computer has enough RAM, free RAM you can find a job. For example, as is often given in these examples: early start of the program and hold it in memory to speed up subsequent runs. Applying the one presented here tips for Ubuntu, I sincerely hope that your system will become more responsive and fast.
Дата последней правки: 2023-12-28 13:28:16