GUIDE: LINUX
HOW TO MAKE UBUNTU 21.04 FASTER
Today I am going to show you how to make your ubuntu 21.04 faster. These methods will work for most of the Debian-based os.
Linux distro usually runs fast and is snappy too but with time they become slow and sluggish.
you can do the following step to make your computer run faster
1: Restart your computer
I know this is a bit of pretty lame advice but this is an important thing that many users forget while working. You should restart your device at least once a day for proper functioning.
2: Improve your ram management
Ram plays an important role in the snappy functioning of the operating system. To improve the ram management of the computer you should use the following steps
(i) Decrease swap usage
On computers with a very low ram, people usually make the swap size very large, but they don't configure the swap usage value. This is a very important thing that will determine the rate at which your os will use the swap for saving files
**Please note if your computer has at least 8Gb ram, then you can skip this part
Ubuntu's inclination to use the swap is determined by a value called swappiness. The lower the value, the longer it takes before Ubuntu starts using the swap. On a scale of 0-100, the default value is 60. Which is much too high for normal desktop use; the optimal compromise is probably 20. Decreasing this default value on a desktop computer has no negative side effects whatsoever.
To decrease the swappiness value open a terminal by using ctrl+alt+t
Check the current swappiness value by:
cat /proc/sys/vm/swappiness
The by default value will be 60. To change the swappiness value, type
sudo gedit /etc/sysctl.conf
If you don't have gedit then don't worry replace gedit with any suitable editor installed in your system.
Scroll down to the bottom of the file and paste the following value in the end, increase or decrease the value by a smaller amount to find the right swappiness value for your system.
vm.swappiness=20
Now save the file and exit the editor and reboot your computer to see the results
(ii) increase zswap usage
sudo gedit /etc/default/grub
zswap.max_pool_percent=40
save the modified file and close the editor, update-grub using the following command
sudo update-grub
reboot your computer and if you want to check whether the change was implemented or not, use the command given bellow
cat /sys/module/zswap/parameters/max_pool_percent
3.Turn of some startup applications
This tweak can help you in reducing the boot time and will enable the system to run faster after startup
Fire up a terminal and paste the following commands
cd /etc/xdg/autostart/
sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop
Now open up your start menu and search for startup applications, untick any unwanted application.
*Don't touch any other application which you don't know, be careful while unticking because if you unticked something important, then your system will end up being trash!!!!
4.Limit the number of extensions in chrome
Sometimes you feel like making a Christmas tree of your chrome browser by installing tons of extensions it kind of looks good, but trust me it puts a serious effect on the performance of your browser. Reducing the number of extensions will also reduce the ram usage and hence you will get a more fluid experience.
5. Put /tmp on a tmpfs
Does your computer have lots of ram? and do you still want to boost your performance?
If you have at least 8Gb ram then you can follow this step, we will make a tmpfs filesystem so that temporary files will not be placed on the hard disk anymore, but on a virtual ramdisk instead.
in certain cases, this will not only improve overall performance but also reduce boot time.
sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
then paste this command also and press enter
sudo systemctl enable tmp.mount
After it's done reboot your computer. To check whether if it's working or not use the below command
systemctl status tmp.mount
By default, a tmpfs partition has its maximum size set to half your total RAM. The actual memory consumption depends on how much you fill it up, as a tmpfs partition doesn't consume any memory until it is actually needed.
Note: in general, do not apply this on systems with less RAM than 8 GB!
Because then this tweak might not make them faster, but (much)
slower.
(i) Changing the default maximum size tmpfs
If you wish to set another maximum size for tmpfs than the default, you can do that by adding a size option to /etc/systemd/system/tmp.mount. For example, if you wish to set the maximum size to 2 Gigabyte, copy/paste this line into the terminal:
sudo sed -i 's/,nodev/,nodev,size=2G/' /etc/systemd/system/tmp.mountAfterward, reboot your computer.
After the reboot you can check whether the modification has succeeded, by
executing this command:
df -h /tmp
(i) How to remove tmpfs
sudo rm -v /etc/systemd/system/tmp.mount
then reboot your computer
6.Turn off the firewall logging
Do you have enabled the firewall (which is recommended)? Then you'll
probably never look at its logs, so it won't hurt to turn off all logging by
the firewall. Especially because it can be rather spammy sometimes. Turning
off its log can save some system resources and disk space, and can be done
like this:-
sudo ufw logging off
That's it it's done
That's all for today, I hope you liked my post. Do share it with your friends if they also want to speed up their computers.
----------------------------------------The End----------------------------------------
0 Comments