10 条加速 Ubuntu Linux 的杀手级技巧
Ubuntu 优化

> 
> 一些实际的**加速 Ubuntu Linux 的技巧**。 这里的技巧对于大多数版本的 Ubuntu 是有效的，也可以应用于 Linux Mint 以及其他的基于 Ubuntu 的发行版。
> 
> 
> 


也许你经历过使用 Ubuntu 一段时间后系统开始运行缓慢的情况。 在这篇文章里，我们将看到几项调整以及**使 Ubuntu 运行更快的窍门**。


在我们了解如何提升 Ubuntu 的总体系统表现之前，首先让我们思考为什么系统逐渐变慢。这个问题可能有很多原因。也许你有一台只有基础配置的简陋的电脑；也许你安装了一些在启动时即耗尽资源的应用。事实上原因无穷无尽。


这里我列出一些能够帮助你稍微加速 Ubuntu 的小调整。也有一些你能够采用以获取一个更流畅、有所提升的系统表现的经验。你可以选择遵循全部或部分的建议。将各项调整一点一点的结合就能给你一个更流畅、更迅捷快速的 Ubuntu。


### 使 Ubuntu 更快的技巧


![Tips to speed up Ubuntu](/data/attachment/album/201806/29/084505zm0hjcwjlkpa0w8m.jpg)


我在一个较老版本的 Ubuntu 上使用了这些调整，但是我相信其他的 Ubuntu 版本以及其他的例如 Linux Mint、 Elementary OS Luna 等基 Ubuntu 的 Linux 版本也是同样适用的。


#### 1、 减少默认的 grub 载入时间


Grub 给你 10 秒的时间以让你在多系统启动项或恢复模式之间改变。对我而言，它是多余的。它也意味着你将不得不坐在电脑旁，敲下回车键以尽可能快的启动进入 Ubuntu。这花了一点时间，不是吗？ 第一个技巧便是改变这个启动时间。如果你使用图形工具更舒适，阅读这篇文章来[使用 Grub 定制器改变 grub 时间以及启动顺序](https://itsfoss.com/windows-default-os-dual-boot-ubuntu-1304-easy/ "Make Windows Default OS In Dual Boot With Ubuntu 13.04: The Easy Way")。


如果更倾向于命令行，你可以简单地使用以下的命令来打开 grub 配置：



```
sudo gedit /etc/default/grub &

```

并且将 `GRUB_TIMEOUT=10` 改为 `GRUB_TIMEOUT=2`。这将改变启动时间为 2 秒。最好不要将这里改为 0，因为这样你将会失去在操作系统及恢复选项之间切换的机会。一旦你更改了 grub 配置，使用以下命令来使更改生效：



```
sudo update-grub

```

#### 2、 管理开机启动的应用


渐渐地你开始安装各种应用。 如果你是我们的老读者, 你也许从 [App of the week](https://itsfoss.com/tag/app-of-the-week/) 系列安装了许多应用。


这些应用中的一些在每次开机时都会启动，当然资源运行这些应用也会陷入繁忙。结果：一台电脑因为每次启动时的持续时间而变得缓慢。进入 Unity Dash 寻找 “Startup Applications”：


![](/data/attachment/album/201806/29/084506eygjgge7y2fkz3f1.jpg)


在这里，看看哪些应用在开机时被载入。现在考虑在你每次启动 Ubuntu 时是否有不需要启动的应用。尽管移除它们：


![](/data/attachment/album/201806/29/084507t1djdzl1odfo9f1d.jpg)


但是要是你不想从启动里移除它们怎么办？举个例子，如果你安装了 [Ubuntu 最好的指示器程序](https://itsfoss.com/best-indicator-applets-ubuntu/ "7 Best Indicator Applets For Ubuntu 13.10")之一， 你将想要它们在每次开机时自动地启动。


这里你所能做的就是延迟一些程序的启动时间。这样你将能够释放开机启动时的资源，并且一段时间后你的应用将被自动启动。在上一张图片里点击 Edit 并使用 sleep 选项来更改运行命令。


例如，如果你想要延迟 Dropbox 指示器的运行，我们指定时间 20 秒，你只需要在已有的命令里像这样**加入一个命令**：



```
sleep 20;

```

所以，命令 `dropbox start -i` 变为 `sleep 20; drobox start -i` 。这意味着现在 Dropbox 将延迟 20 秒启动。你可以通过相似的方法来改变另一个开机启动应用的启动时间。


![](/data/attachment/album/201806/29/084508jo9ggga5v58ivirv.jpg)


#### 3、 安装 preload 来加速应用载入时间：


Preload 是一个后台运行的守护进程，它分析用户行为和频繁运行的应用。打开终端，使用如下的命令来安装 preload：



```
sudo apt-get install preload

```

安装后，重启你的电脑就不用管它了。它将在后台工作。[阅读更多关于preload](https://itsfoss.com/improve-application-startup-speed-with-preload-in-ubuntu/ "Improve Application Startup Speed With Preload in Ubuntu")


#### 4、 选择最好的软件更新镜像


验证你更新软件是否正在使用最好的镜像是很好的做法。Ubuntu 的软件仓库镜像跨过全球，使用离你最近的一个是相当明智的。随着从服务器获取包的时间减少，这将形成更快的系统更新。


在 “Software & Updates->Ubuntu Software tab->Download From” 里选择 “Other” 紧接着点击 “Select Best Server”：


![](/data/attachment/album/201806/29/084509kg7widyxoadhf4ix.jpg)


它将运行测试来告知你那个是最好的镜像。正常地，最好的镜像已经被设置，但是我说过，验证它没什么坏处。并且，如果仓库缓存的最近的镜像没有频繁更新的话，这将引起获取更新时的一些延迟。这对于网速相对慢的人们是有用的。你可以使用这些技巧来[加速 Ubuntu 的 wifi](https://itsfoss.com/speed-up-slow-wifi-connection-ubuntu/ "Speed Up Slow WiFi Connection In Ubuntu 13.04")。


#### 5、 为了更快的更新，使用 apt-fast 而不是 apt-get


`apt-fast` 是 `apt-get` 的一个 shell 脚本包装器，通过从多连接同时下载包来提升更新及包下载速度。 如果你经常使用终端以及 `apt-get` 来安装和更新包，你也许会想要试一试 `apt-fast`。使用下面的命令来通过官方 PPA 安装 `apt-fast`：



```
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast

```

#### 6、 从 apt-get 更新移除语言相关的 ign


你曾经注意过 `sudo apt-get` 更新的输出吗？其中有三种行，`hit`、`ign` 和 `get`。 你可以在[这里](http://ubuntuforums.org/showthread.php?t=231300)阅读它们的意义。如果你看到 IGN 行，你会发现它们中的大多数都与语言翻译有关。如果你使用所有的英文应用及包，你将完全不需要英文向英文的包数据库的翻译。


如果你从 `apt-get` 制止语言相关的更新，它将略微地增加 `apt-get` 的更新速度。为了那样，打开如下的文件：



```
sudo gedit /etc/apt/apt.conf.d/00aptitude

```

然后在文件末尾添加如下行：



```
Acquire::Languages "none";

```

[![speed up apt get update in Ubuntu](/data/attachment/album/201806/29/084510yvpjukzlj60vlvvs.jpg)](https://itsfoss.com/wp-content/uploads/2014/01/ign_language-apt_get_update.jpeg)


#### 7、 减少过热


现在过热是电脑普遍的问题。一台过热的电脑运行相当缓慢。当你的 CPU 风扇转得像 [尤塞恩·博尔特](http://en.wikipedia.org/wiki/Usain_Bolt) 一样快，打开一个程序将花费很长的时间。有两个工具你可以用来减少过热，使 Ubuntu 获得更好的系统表现，即 TLP 和 CPUFREQ。


在终端里使用以下命令来安装 TLP：



```
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start

```

安装完 TLP 后你不需要做任何事。它在后台工作。


使用如下命令来安装 CPUFREQ 指示器：



```
sudo apt-get install indicator-cpufreq

```

重启你的电脑并使用 Powersave 模式：


![](/data/attachment/album/201806/29/084512r2mx2tshm58qq6cs.jpg)


#### 8、 调整 LibreOffice 来使它更快


如果你是频繁使用 office 产品的用户，那么你会想要稍微调整默认的 LibreOffice 使它更快。这里你将调整内存选项。打开 Open LibreOffice，进入 “Tools->Options”。在那里，从左边的侧栏选择“Memory”并启用 “Systray Quickstarter” 以及增加内存分配。


![](/data/attachment/album/201806/29/084513kjtttzwfaatsspxf.jpg)


你可以阅读更多关于[如何提速 LibreOffice](https://itsfoss.com/speed-libre-office-simple-trick/ "Speed Up LibreOffice With This Simple Trick") 的细节。


#### 9、 使用轻量级的桌面环境 (如果你可以)


如果你选择安装默认的 Unity of GNOME 桌面环境, 你也许会选择一个轻量级的桌面环境像 [Xfce](https://xfce.org/) 或 [LXDE](https://lxde.org/)。


这些桌面环境使用更少的内存，消耗更少的 CPU。它们也自带轻量应用集来更深入地帮助更快地使用 Ubuntu。你可以参考这篇详细指南来学习[如何在 Ubuntu 上安装 Xfce](https://itsfoss.com/install-xfce-desktop-xubuntu/)。


当然，桌面也许没有 Unity 或 GNOME 看起来现代化。那是你必须做出的妥协。


#### 10、 使用不同应用的更轻量可选


这不仅仅是建议和喜好。一些默认的或者流行的应用是耗资源的且可能不适合低端的电脑。你能做的就是使用这些应用的一些替代品。例如，使用 [AppGrid](https://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ "App Grid: Lighter Alternative Of Ubuntu Software Center") 而不是 Ubuntu 软件中心。使用 [Gdebi](https://itsfoss.com/install-deb-files-easily-and-quickly-in-ubuntu-12-10-quick-tip/ "Install .deb Files Easily And Quickly In Ubuntu 12.10 [Quick Tip]") 来安装包。使用 AbiWord 而不是 LibreOffice Writer 等。


可以断定这些技巧的汇总使 Ubuntu 14.04，16.04 以及其他版本更快。我确定这些技巧会提供一个总体上更好的系统表现。


对于加速 Ubuntu 你也有妙计吗？这些技巧也帮到你了吗？分享你的观点。 问题，建议总是受欢迎的。请在评论区里提出来。




---


via: <https://itsfoss.com/speed-up-ubuntu-1310/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[darsh8](https://github.com/darsh8) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

You might have experienced that the system starts running slow after using Ubuntu for some time. In this article, we shall see several tweaks and tips to make Ubuntu run faster.

Before we see how to improve overall system performance in Ubuntu, first let’s ponder on why the system gets slower over time. There could be various reasons for it. You may have a computer with a basic configuration and might have installed numerous applications which are eating up resources at boot time.

It is not rocket science, but as you continue using a system, installing apps, and carrying out many tasks, it affects your system resources in one way or the other. So, to ensure a fast-performing system, you will have to manage numerous aspects of your Linux distribution.

Here I have listed various small tweaks along with some suggestions for best practices that can help you speed up Ubuntu a little.

## 1. Reduce the default grub load time:

By default, the GRUB load time is set to 0 in Ubuntu. This speeds up the system boot.

But, if you are using some dual boot system, the grub gives you some time to change between OSs or recovery. To some, this could be a slow experience.

If you are one of them, you can simply use the following command to open the grub configuration:

```
sudo gedit /etc/default/grub &
```


And change `GRUB_TIMEOUT`

to something lower than 5, as convenient for your specific needs. For example, `GRUB_TIMEOUT=2`

will change the boot time to 2 seconds.

Once you have changed the grub configuration, [update grub to make the change](https://itsfoss.com/update-grub/) count:

```
sudo update-grub
```


If you are more comfortable with a GUI tool, you can refer to our resource on using [grub customizer](https://itsfoss.com/grub-customizer-ubuntu/).

## 2. Manage startup applications:

Over time, you tend to start installing applications. If you are a regular It’s FOSS reader, you might have installed many apps from our [first look series](https://news.itsfoss.com/tag/first-look/).

Some of these apps start at each startup, and, of course, resources will be busy in running these applications. Result, a slow computer for a significant time duration at each boot. Go to overview and look for Startup Applications:

![Startup Applications in Ubuntu Activities Overview](https://itsfoss.com/content/images/2023/11/Startup-apps-in-activities-overview.png)

Here, look at what applications are loaded at startup. Now, think if there are any applications that you don’t require to be started up every time you boot into Ubuntu. Please don’t hesitate to remove them.

But what if you don’t want to remove the applications from startup?

For example, if you installed one of the [best indicator applets for Ubuntu](https://itsfoss.com/best-indicator-applets-ubuntu/), you will want them to be started automatically at each boot.

What you can do here is, delay the start of some programs. This way you will free up the resource at boot time and your applications will be start automatically, after the specified time. Giving some breathing space to the computer to process all the startup programs.

For example, if you want to delay the running of the Flameshot indicator, for let’s say 20 seconds, you just need to add a command like this in the existing startup configuration:

```
sleep 20;
```


![Change Startup App start delay using sleep command](https://itsfoss.com/content/images/2023/11/change-startup-app-start-delay.png)

So, the command `flameshot`

changes to `sleep 20;flameshot`

. This means that now Flameshot will start with a 20-second delay. You can change the start time of other start-up applications similarly.

## 3. Install preload to speed up application load time:

Preload is a daemon that runs in the background and analyzes user behavior and frequently run applications. It will move binaries/dependencies of your most-used apps in to the memory by predicting as per your usage.

Sure, this could also mean using the memory unnecessarily (if you change your behavior). But, as far as user feedback is concerned, it is not something that causes a slowdown.

You can always uninstall it through the terminal if you do not find it helpful.

Open a terminal and use the following command to install preload:

```
sudo apt install preload
```


After installing it, restart your computer and forget about it. It will be working in the background.

## 4. Choose the best mirror for software updates:

It is good to verify that you are using the best mirror to update the software. Ubuntu software repositories are mirrored across the globe, and it is quite advisable to use the one which is nearest to you. This will result in a quicker system update as it reduces the time to get the packages from the server.

Navigate through **Software & Updates ⇾ Ubuntu Software ⇾ Download From**, and click on **Other (**as shown in the screenshot below**)** and thereafter click on **Select Best Server**:

![Click on the "Select Best Mirror" Button](https://itsfoss.com/content/images/2023/11/select-best-mirror-button.png)

It will run a test and tell you which is the best mirror for you. Normally, the best mirror is already set, but as I said, no harm in verifying it. Furthermore, this may result in some delay in getting the updates if the nearest mirror where the repository is cached is not updated frequently. This is useful for people with a relatively slow internet connection.

You can also refer to our other resource to [speed up Wi-Fi speed](https://itsfoss.com/speed-up-slow-wifi-connection-ubuntu/) in Ubuntu.

Once the tests are finished, click on **Choose Server** and then click **Close**.

![Choose the server selected by the mirror test using the "Choose Server" button and then click close.](https://itsfoss.com/content/images/2023/11/choose-server-and-click-close.png)

This will ask you to reload the software cache. Use the **Reload** button when asked.

It's better to run an update after this via the terminal:

```
sudo apt update
```


## 5. Use apt-fast instead of apt-get for a speedy update:

`apt-fast`

is a shell script wrapper for “apt-get” that improves update and package download speed by downloading packages from multiple connections simultaneously.

If you frequently use terminal and apt-get to install and update the packages, you may want to give apt-fast a try. Install apt-fast via the official PPA using the following commands:

```
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast
```


Read more about configuring apt-fast from their [official repository](https://github.com/ilikenwf/apt-fast#configuration).

[Linux alias command](https://linuxhandbook.com/linux-alias-command/)for frequently used commands. This will reduce the time spent typing these commands repeatedly.

## 6. Remove language-related sources from apt update:

Have you ever noticed the output of sudo apt update?

There are three kinds of lines in it, **hit**, **ign** and **get**. You can explore their meanings in our [apt command guide](https://itsfoss.com/apt-command-guide/#update-package-database-with-apt).

You may not notice the IGN lines, depending on the repositories you have.

However, if you look at IGN lines, you will find that most of them are related to language translation. If you use all the applications, and packages in English, there is absolutely no need for a translation of the package database from English to English.

If you suppress these language-related updates from repositories, it will slightly increase the apt update speed. To achieve that, open the following file:

```
sudo gedit /etc/apt/apt.conf.d/00aptitude
```


And add the following line at the end of this file:

```
Acquire::Languages "none";
```


![Editing the file to change Language Related IGN settings](https://itsfoss.com/content/images/2023/11/ign-related-settings.png)

## 7. Reduce overheating

Overheating is a common problem in computers these days. An overheated computer runs quite slow. It takes ages to open a program when thermal throttling affects your system. There are several tools that you can use to reduce overheating and thus get a better system performance on Ubuntu.

The GNOME power-profiles-daemon will be preinstalled on all the latest Ubuntu releases. You can use this tool from the power option in the settings to change the system to three modes, like Power Save, Balanced, and Performance Mode.

Similarly, CPUFREQ can help you adjust the CPU frequency. To [install CPUFREQ indicator](https://itsfoss.com/cpufreq-ubuntu/) use the following command:

```
sudo apt install indicator-cpufreq
```


Restart your computer. Do note that you will be saving battery in this mode by compensating with some performance hit.

![GNOME Power Profiles in the top panel](https://itsfoss.com/content/images/2023/11/Ubuntu-GNOME-power-profiles.png)

For an older system, you can install and use TLP, with the following commands in a terminal:

```
sudo apt update
sudo apt install tlp tlp-rdw
sudo tlp start
```


You don’t need to do anything after installing TLP. It works in the background.

## 8. Use a lightweight desktop environment (if you can)

Usually, the default GNOME desktop-powered Ubuntu distribution takes up more system resources/memory to work snappier.

In such cases, you may opt for a lightweight desktop environment like [Xfce](https://xfce.org/?ref=itsfoss.com) or [LXDE](https://lxde.org/?ref=itsfoss.com), or even [KDE](https://kde.org/?ref=itsfoss.com).

You can learn the [differences between KDE and GNOME](https://itsfoss.com/kde-vs-gnome/) if you are curious.

[KDE vs GNOME: What’s the Ultimate Linux Desktop Choice?Curious about the desktop environment to choose? We help you with KDE vs GNOME here.](https://itsfoss.com/kde-vs-gnome/)![](https://itsfoss.com/content/images/wordpress/2022/02/gnome-vs-kde.png)


![](https://itsfoss.com/content/images/wordpress/2022/02/gnome-vs-kde.png)

These desktop environments use less system resources and could give you a faster performance overall. They also come with a set of lightweight applications that further help run Ubuntu faster.

You can choose to install a desktop environment manually by referring to our tutorial on [how to install Xfce on Ubuntu](https://itsfoss.com/install-xfce-desktop-xubuntu/). Or, you can pick another flavour of Ubuntu for your system, like Kubuntu, Xubuntu, or Ubuntu MATE.

## 9. Use lighter alternatives for different applications

This is more of a suggestion and liking. Some default or popular applications are resource heavy and may not be suitable for an old computer. You can replace them with some alternatives.

For example, use [Gdebi](https://itsfoss.com/gdebi-default-ubuntu-software-center/) to install packages. Use AbiWord instead of LibreOffice Writer etc.

## 10. Remove Unnecessary software

Sure, it is exciting to install various software to enhance the desktop experience. But, often, we forget to remove them from our system, even if we discontinue using it.

So, it is always good to make a habit of regularly evaluating the software installed and removing the unnecessary ones as per your current requirements.

It is a good to use the `autoremove`

command to remove various leftover packages in the system.

`sudo apt autoremove`


Furthermore, if you are a Flatpak user, then there can be unused runtimes present, that were not removed, when the corresponding app is removed. You can clear them using:

```
flatpak uninstall --unused
```


**Suggested Read 📖**

[How to Clear Apt Cache on Ubuntu and Free Crucial Disk SpaceLearn what apt cache is, why it is used, why you would want to clean it and some other things you should know about purging apt cache.](https://itsfoss.com/clear-apt-cache/)![](https://itsfoss.com/content/images/wordpress/2020/10/Clear-Apt-Cache.png)


![](https://itsfoss.com/content/images/wordpress/2020/10/Clear-Apt-Cache.png)

## 11. Remove Unnecessary Extensions

GNOME provides various [extensions, that enhance the performance of the system](https://itsfoss.com/best-gnome-extensions/). But, as the number of extensions on your system increases, it can cause significant performance issues. So, always keep the extensions to those that you cannot avoid.

If you are considering the speed and performance of the system, you can stay away from heavily customizing extensions.

## 12. Use a system cleaner app

![](https://itsfoss.com/content/images/2023/11/stacer-ft.webp)

If tidying up your system takes more effort than you intended, you can try using [system optimizing applications like Stacer](https://itsfoss.com/optimize-ubuntu-stacer/).

It can help you clean up junk files, manage startup processes, monitor system resources, and let you do many things from a single app.

With all the functions available, you can end up with a fast-performing Linux system.

## 13. Free up space in /boot partition

If you happen to use a /boot partition separately, often it gets to the point where you have to free some space to be able to install new apps or work without any performance issues.

And, if you get the same warning, and have no clue what to do, fret not, we have a [dedicated guide on it](https://itsfoss.com/free-boot-partition-ubuntu/) to free up space.

[How to Free Up Space in /boot Partition on Ubuntu Linux?Getting a warning that the boot partition has no space left? Here are some ways you can free up space on the boot partition in Ubuntu Linux.](https://itsfoss.com/free-boot-partition-ubuntu/)![](https://itsfoss.com/content/images/wordpress/2020/10/free-boot-space-ubuntu-linux.jpg)


![](https://itsfoss.com/content/images/wordpress/2020/10/free-boot-space-ubuntu-linux.jpg)

## 14. Optimizing SSD Drive

When you delete a file, it is not actually deleted from your system; instead, it is marked for removal, and is removed only when some data is written over it.

So, without proper care, this can lead to fragmentation and degraded performance of SSDs over time. On Ubuntu and other Linux systems, there is this tool called fstrim, that helps keep SSD clean, by freeing up unused blocks of data periodically.

If you have an SSD, it is automatically enabled most of the time. You can check the status by using:

```
sudo systemctl status fstrim.timer
```


If not enabled, enable it using;

```
sudo systemctl enable fstrim.timer
```


Now reboot your system.

## 15. Remove Trash Periodically

You know that, usually, the right-click option in Nautilus file manager has only “Move to Trash” button, unless you tweaked it. This means, the removed files are going to the trash.

You can set it to remove the trash item automatically in a periodic fashion.

For this, go to Settings ⇾ Privacy ⇾ File History and Trash.

![Remove Trash Contents Periodically](https://itsfoss.com/content/images/2023/11/remove-trash-content-automatically.png)

Here, set **Automatically Delete Trash Content** and then choose at what interval you want to clear the trash. You can also remove temporary files in this fashion, but you should know what you are removing.

**Suggested Read 📖**

[7 Simple Ways to Free Up Space on Ubuntu and Linux MintRunning out of space on your Linux system? Here are several ways you can clean up your system to free up space on Ubuntu and other Ubuntu based Linux distributions.](https://itsfoss.com/free-up-space-ubuntu-linux/)![](https://itsfoss.com/content/images/2023/06/free-space-in-ubuntu-mint-linux.png)


![](https://itsfoss.com/content/images/2023/06/free-space-in-ubuntu-mint-linux.png)

## 16. Use the Memory Saver Feature of Browsers

Nowadays, most of the browsers, especially the Chromium-based browsers, come with a feature called **Tab Sleep/Memory Saver**. In this feature, you can set a Tab as idle after some time inactive so that you can save some memory.

This will be a good setting if you have numerous tabs open, and do not mind if some tabs go idle.

You can also exclude sites from the list so that they will be kept active all the time.

![Brave Browser Memory Saver Settings](https://itsfoss.com/content/images/2023/11/memory-saver-settings-in-brave.png)

## [Bonus] Change Swappiness (Advanced)

Your operating system moves some process to the swap memory (disk storage), on top of RAM, to make room for things when you already have several processes active.

However, just because the disk drive is used for swap memory, it is slower than your RAM.

Hence, it is better to avoid using swap memory as much as possible.

You can explore more about it in our [swap guide](https://itsfoss.com/swap-size/):

[How Much Swap Should You Use in Linux?How much should be the swap size? Should the swap be double of the RAM size or should it be half of the RAM size? Do I need swap at all if my system has got several GBs of RAM? Your questions answered in this detailed article.](https://itsfoss.com/swap-size/)![](https://itsfoss.com/content/images/2023/06/how-much-swap-should-you-use-on-Linux.png)


![](https://itsfoss.com/content/images/2023/06/how-much-swap-should-you-use-on-Linux.png)

The Swappiness is a Linux kernel parameter that determines the degree of utilizing swap memory. The default value of Swappiness on Ubuntu is 60. You can check this by running:

```
cat /proc/sys/vm/swappiness
```


Setting a low swappiness value like 10, 35 or 45, will reduce the chances of the system using swap, resulting in a faster performance.

Above all, it depends on the system hardware, workload, etc. So, you need to experiment with the value. To change the swappiness value for the current session, use the command:

```
sudo sysctl vm.swappiness=45
```


This will be reset to 60 when the system is rebooted. Once you find the optimum performance value for your system, and satisfied with it, you can change it permanently, by writing it to the `sysctl.conf`

file.

```
sudo nano /etc/sysctl.conf
```


Enter the following line to the bottom.

```
vm.swappiness=45
```


Save this and reboot your system.

**Suggested Read 📖**

[7 System Monitoring Tools for Linux That are Better Than TopTop command is good but there are better alternatives. Take a look at these system monitoring tools that are similar to top, but better than it.](https://itsfoss.com/linux-system-monitoring-tools/)![](https://itsfoss.com/content/images/wordpress/2020/08/system-monitoring-tools-linux.jpg)


![](https://itsfoss.com/content/images/wordpress/2020/08/system-monitoring-tools-linux.jpg)

## Wrapping Up

That concludes the collection of tips to make Ubuntu 22.04, 20.04, and other versions faster. I am sure these tips would provide an overall better system performance.

While the above-mentioned tips are worth considering, it is also important to keep your system regularly updated so that it will be more reliable in the long run.

Furthermore, if you prefer a faster page load while browsing, you can opt for third-party DNS, like Google, or Cloudflare.

*Do you have some tricks up your sleeves as well to speed up Ubuntu? Did these tips help you as well? Do share your views. Feel free to drop your thoughts in the comment section.*