📜 ⬆️ ⬇️

How I optimized the system: Ubuntu 8.04 Hardy

Yesterday I was going to speed up the work (it turned out quite noticeably) and the system load (30 seconds, against one and a half minutes), read many how-to.
I will describe what and where I improved. So about the methods, in order.

1. Register the hostname.
sudo vim /etc/hosts
It was:
127.0.0.1 localhost
127.0.1.1 lib

It became:
127.0.0.1 localhost lib
127.0.1.1 lib

We sign what is to the right of the console call, for example: lib @ laptop: ~ $, then we enter the laptop.
This speeds up the system loading somewhat and speeds up the launch of some programs.

2. Using a kernel configured for your system, more details on how to build a kernel in Ubuntu . The link says how the kernel is going for 6.10, but the tips are also valid for 8.04.

3. We speed up the work of the ext3 file system:
sudo vim /boot/grub/menu.lst
Add to existing lines:
# defoptions = quiet splash rootflags = data = writeback
# altoptions = (recovery mode) single rootflags = data = writeback
I removed quiet and splash in defoptions and added vga = 0x324 , for framebuffer.
Update grub.
sudo update-grub
Rule fstab:
sudo vim /etc/fstab
In my case, add data = writeback:
UUID=32903d9a-98a8-4048-8472-a0896b81b3fa / ext3 relatime,errors=remount-ro,noatime, data=writeback 0 1
We carry out:
sudo tune2fs -o journal_data_writeback /dev/sda1
/ dev / sda1 is the name of the partition on which /
Checking:
sudo tune2fs -l /dev/sda1
This method is fraught with the fact that you can lose some data when the system is unexpectedly turned off, for example, if you have suddenly turned off the power (it does not threaten me, since I still have the battery)
')
4. We are speeding up the network somewhat (disable IPv6):
sudo vim /etc/modprobe.d/bad_list
Add: alias net-pf-10 off
In about: config in Firefox, disable network.dns.disableIPv6 , set true .
In the same place:
network.http.pipelining true
network.http.pipelining.firstrequest true
network.http.pipelining.maxrequests 8
network.http.proxy.pipelining true
nglayout.initialpaint.delay 0
browser.turbo.enabled true
network.http.max-connections-per-server 8
network.http.max-persistent-connections-per-proxy 8
network.http.max-persistent-connections-per-server 8

This will speed up page loading.
Add to / etc / environment:
MOZ_DISABLE_PANGO=1
This will speed up the rendering of pages in Firefox.

5. Remove unnecessary consoles (which are called by Ctrl + Alt + F1..8):
sudo rm /etc/event.d/tty[3-6]
6. Accelerate the system load:
sudo vim /etc/init.d/rc
Expose: CONCURRENCY = shell
This sets up multiple booting at the same time, especially if you have a multi-core system.
7. Remove unnecessary services from the download:
sudo aptitude install sysv-rc-conf
sudo sysv-rc-conf

Details about the services written on ubuntuforums.org
Additionally, I disabled apache and mysql, I launch them directly when I want to work with a local web server.

8. If you have a permanent internet connection, add to /etc/sysctl.conf .
# Tweaks for faster broadband...
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1


All this allowed me to speed up the system by an order of magnitude, but there are still a couple of ways that I cannot recommend, because I do not quite understand how they work, namely:
preload package installed (sudo aptitude install preload), prelink (sudo aptitude install prelink)
Read more about prelink here .

Have a good use!

Source: https://habr.com/ru/post/38043/


All Articles