Contents of this page:

Improve usage of the system memory (RAM)

The absolute number one: decrease swap use

cat /proc/sys/vm/swappiness

60

xed admin:///etc/sysctl.conf

# Decrease swap usage to a more reasonable level

vm.swappiness=20

cat /proc/sys/vm/swappiness

20

At least 6 GB memory (RAM): tame the inode cache

xed admin:///etc/sysctl.conf

# Improve cache management

vm.vfs_cache_pressure=50

Only 2 GB RAM or less: consider enabling zRam

zRam

sudo apt-get install zram-config

cat /proc/swaps

How to disable zRam again

sudo apt-get purge zram-config

cat /proc/swaps

Make your Solid State Drive (SSD) run faster

Disable Java in Libre Office

Use a Java runtime environment

Turn off some startup applications

msconfig

session

Session and Startup

Cinnamon, MATE and Xfce: turn off all visual effects and/or compositing

Cinnamon: take some load off your graphics card

Peek at the desktop on hover

Preferences

MATE: take some load off your graphics card

Windows

Window Manager

Marco + Compositing

Marco + Compton

Marco

Marco + Compton

Placement

Enable window tiling

General

Enable software compositing window manager

sudo apt-get remove compiz-core

Xfce: take some load off your graphics card

Xfwm4 + Compositing

Xfwm4 + Compton

Xfwm4

Marco + Compton

sudo apt-get remove compiz-core

Add-ons and extensions: don't turn your web browser into a Christmas tree

Limiting the disk write actions of Firefox

Putting the Firefox network cache into the RAM

about:config

browser.cache.disk.enable

false

browser.cache.memory.enable

true

browser.cache.memory.capacity

-1

307200

about:cache

Disabling sessionstore

about:config

sessionstore

browser.sessionstore.interval

15000

15000000

Firefox: optimize the Places database from time to time

about:support

Places Database

Verify Integrity

Lots of RAM (at least 8 GB): put /tmp on tmpfs

/tmp

tmpfs

sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/

sudo systemctl enable tmp.mount

systemctl status tmp.mount

How to undo tmpfs

sudo rm -v /etc/systemd/system/tmp.mount

Speed up your wireless internet (some WiFi chipsets)

The easiest way: speeding up your WiFi by executing a single command

iwconfig

wlp2s0

on

off

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

iwconfig

off

The harder way: speeding up your WiFi by editing a file manually

iwconfig

wlp2s0

on

off

xed admin:///etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

[connection]

wifi.powersave = 3

3

2

iwconfig

off

Speed up your Intel wireless chipset

iwlwifi

Tx AMPDU

lsmod | grep iwlwifi

iwlwifi

echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-speed.conf

Problems? Then undo it like this

sudo rm -v /etc/modprobe.d/iwlwifi-speed.conf

Remove the search database

mlocate

mlocate

locate

mlocate

sudo apt-get purge mlocate locate

Problems? Then undo it like this

mlocate

sudo apt-get install mlocate

Turn off the firewall log

sudo ufw logging off

Regrets? Then turn firewall logging on again like this

sudo ufw logging low

Tame the thumbnail feature

Preview

Previewable files

5 MB

Show thumbnails:

No

Local Files Only

sudo apt-get install spacefm-gtk3

General

Show Thumbnails

Increase battery life by disabling the Bluetooth driver

echo "blacklist btusb" | sudo tee /etc/modprobe.d/blacklist-bluetooth.conf

How to undo (re-enabling Bluetooth support)

sudo modprobe -v btusb

sudo rm -v /etc/modprobe.d/blacklist-bluetooth.conf

Clean up your Mint

Want more tips?

Speeding up your Linux Mint is fun! That way, you'll get more performance out of your computer for free.There are several tweaks to make Linux Mint 20 Ulyana run faster. Some are quite safe, some are risky. Here you'll find only safe ones.I don't like risky tweaks, because I think that stability and reliability are much more important than a speed gain. That's why I've collected a couple of speed tips, that you can apply safely and that'll probably make your Mint run considerably faster. Without diminishing the stability and reliability of your system.Even though in general you can apply those tips safely, nothing in life is really for free.... You always pay some "price". You disable a particular system service, a couple of nice visual effects or some feature.Each tweak therefore has its own "price tag". So you should consider before you apply a tip, whether you're willing to pay the "price" for it.But they're especially effective in combination with the Xfce edition, because that particular lightweight edition is recommended for slow older computers that are in dire need of a speed boost.OK, now that that's out of the way, let's get started:1. You can improve the usage of the system memory with the following tweaks:1.1. This is especially noticeable on computers with relatively low RAM memory: they tend to be far too slow in Mint, and Mint accesses the hard disk too much. Luckily, this can be helped.On the hard disk there's a separate file or partition for virtual memory, called the swap. When Mint uses the swap too much, the computer slows down a lot.Mint's inclination to use the swap, is determined by a value called swappiness. The lower the value, the longer it takes before Mint starts using the swap.On a scale of 0-100, the default value is 60. Which is much too high for normal desktop use. Decreasing this value somewhat on a desktop computer, has no negative side effects whatsoever.Now the how-to for setting the swappiness to a more reasonable level:a. First check your current swappiness value. Type in the terminal ( use copy/paste ):Press Enter.The result will probably beb. To change the swappiness into a more sensible setting, type in the terminal ( use copy/paste to avoid typo's):Press Enter. Note that you'll be asked twice for your password.Now a text file opens. Scroll to the bottom of that text file and add your swappiness parameter to override the default. For that, copy/paste the following two blue lines into the text file:c. Save and close the text file. Then reboot your computer.d. After the reboot, check the new swappiness setting:- Launch a terminal window.- Type ( use copy/paste ):Press Enter.Now it should beif your hard disk is an SSD, there's an extra reason to decrease swappiness. That's because too many write actions, like frequent swapping, reduce the lifespan of an SSD. Also check these tips for optimizing an SSD for your Linux 1.2. Computers with at least 6 GB of memory (RAM), will probably benefit by shrinking the inode cache less aggressively.The price that you pay for this, is that certain system items will remain longer in the RAM memory, which decreases the amount of available RAM for general tasks. That's why this tweak is only useful for computers with at least 6 GB of memory (RAM).This is how you do it:a. Type in the terminal ( use copy/paste ):Press Enter.Now a text file opens. Scroll to the bottom of that text file and add your cache parameter to override the default, so copy/paste the following two blue lines into that text file:d. Save and close the text file. Then reboot your computer.1.3. When your computer has little RAM (2 GB or less), then of course your best choice for speed is a lightweight member of the Mint family, like Mint Xfce. But even then the lack of memory will remain a problem, which will cause your system to slow down from time to time. Even when the swappiness has been decreased to 20.In that case, you might achieve better results by enabling the kernel module. zRam creates a compressed swap file in your RAM. The compression factor is the gain: with that, you "increase" your RAM.The price you pay for this, is twofold:- Your processor (CPU) is being taxed more heavily, because it'll have to compress and decompress all the time;- When the system has filled the RAM swap, it'll start swapping on the hard drive as well. With a heavy burden on the available RAM: the chunk of memory that has been sacrificed for the RAM swap.That's why I advise to enable zRam only for computers with little RAM, and even thenYou can enable it as follows:a. Launch a terminal window.b. Type ( use copy/paste ):Press Enter. Type your password when prompted.Press Enter again.c. Reboot your computer.d. Now check whether it works, with the following terminal command:Press Enter.If all has gone well, you should receive a report about one or more /dev/zram "partitions". zRam is active then; no need for further action.1.3.1. When you want to disable and remove zRam again, you need to use a special purging command. This is how you do it:a. Launch a terminal window.b. Type ( use copy/paste ):Press Enter. Type your password when prompted.Press Enter again.c. Reboot your computer.d. Now check whether the removal has succeeded, with the following terminal command:Press Enter.If all has gone well, you should receive no report anymore about one or more /dev/zram "partitions".2. Do you have an SSD for hard drive? Then optimize it to make it faster 3. The performance of Libre Office might be enhanced greatly, when you disable Java in it. This will disable a few features, but usually you won't even miss those.Toolbar Libre Office Writer - Tools - Options...LibreOffice - Advanced - Java Options:remove the tick for:4. You can speed up Mint somewhat, by disabling a couple of system services that may be superfluous for you. These are called startup applications, because they're being launched at startup. This tweak can be compared to tweakingin Windows. Proceed with care!: Menu button - Preferences - Startup Applications: typein the search box of the menu and select:Disable a few servicesand reboot your computer (or log out and then log in again).only disable them, do not remove the application from the list! Keep the tweak easily reversible (you never know).I advise to disable these two services in any case:(it taxes the system heavily from time to time, and it's normally not very useful after the first system check after installation)(if needed, you can always launch it from the menu)Two system services that many people don't need:(if you don't have an NVIDIA video card)(if you have no local network)disabling startup applications is a user preference, so repeat this in each user account.5. Visual effects are nice, but they can slow down your system and even cause stability problems. That's why Cinnamon, MATE and Xfce have only a few visual effects enabled by default.You can gain some speed and stability when you turn off all of them. Even more speed gain can be achieved by selecting a lighter compositor or by disabling compositing entirely.Proceed as follows:5.1. Disabling the "heavy" visual effects and/or compositing in Cinnamon, consists out of four steps:a. First of all, do this:Menu button - Preferences - EffectsTurn off everything there.b. Then make sure this setting is disabled (it's disabled by default, but you may have enabled it yourself sometime):Menu button - Preferences - System Settings - Applets: scroll to "Show desktop" and click on its gears button - disablec. Now this:Menu button - Preferences - Window TilingEnable Window Tiling and Snapping: switch it off.d. Finally, you might disable compositing. Disabling compositing often causes screen tearing when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to this.... Therefore I don't generally recommend to disable compositing.But if you want to disable compositing anyway, this is how to do it:Menu button - Preferences - System SettingsSection: GeneralDisable compositing for full-screen windows: switch it on.whereas MATE and Xfce offer the option to switch the window manager, Cinnamon doesn't: it's tied to its default window manager Muffin.5.2. Disabling the "heavy" visual effects and/or compositing in MATE is easy:a. Menu button - Preferences - Desktop SettingsClick- section: changeinto one of the following two options:. This will cause some speed gain because of the simpler and more lightweight compositor Compton.. This causes maximal speed gain by disabling all compositing, but it also often causes screen tearing when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to disabling compositing.... Therefore I don't generally recommend that.provides the most simple and therefore lightweight compositor; window manager Metacity and its variations are just a low-performance stopgap for maximum hardware compatibility.b. Menu button - Preferences - WindowsIn that tool, do the following two things:I. Tab: deselect:II. If you've changed your window manager into plain Marco without any compositor (and only then!), do this as well:Tab: deselect:c. Remove the unstable and unreliable Compiz, that you never need in any case:- Launch a terminal window.- Type ( use copy/paste to prevent errors):Press Enter. Type your password when prompted.Press Enter again.5.3. Even lightweight champion Xfce has relatively "heavy" compositing by default. Reduce its weight like this:a. Menu button - Settings - Desktop SettingsWindow Manager: changeinto one of the following two options:. This will cause some speed gain because of the simpler and more lightweight compositor Compton.. This causes maximal speed gain by disabling all compositing, but it also often causes screen tearing, when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to disabling compositing.... Therefore I don't generally recommend it.provides the most simple and therefore lightweight compositor; window manager Metacity and its variations are just a low-performance stopgap for maximum hardware compatibility.b. Remove the unstable and unreliable Compiz, that you never need in any case:- Launch a terminal window.- Type ( use copy/paste to prevent errors):Press Enter. Type your password when prompted.Press Enter again.6. You can install a lot of add-ons (extensions) in the web browsers Firefox and Google Chrome. Those add-ons can be very useful, but they have a couple of important disadvantages, because they are "applications within an application":- they slow your browser down, especially if there are a lot of them;- they can cause malfunctions, both in each other and in the browser itself;- it has occurred: add-ons with malicious content. Don't trust them blindly.So don't turn your browser into a Christmas tree: don't adorn it with lots of add-ons. Limit yourself to only a few add-ons, that are really important for you.watch out for add-ons that claim that they make your browser faster! Often they do more harm than good. Do not install them: even if one or two of them can really make your browser run noticeably faster, they may damage the stability of your browser.7. By default, Firefox writes a lot to the hard disk. This reduces its speed. You can limit the disk write actions of Firefox, by putting the Firefox network cache into the RAM and by disabling sessionstore. Like this:7.1. By moving the Firefox network cache from your hard disk to the RAM, you diminish the amount of disk writes. This'll probably make your Firefox noticeably faster. The price you pay is small: it'll only "cost" you 300 MB of your RAM.don't do this when your computer has only 2 GB of RAM or less! Because with very little RAM, even 300 MB can't be missed.Proceed like this:a. Type in the URL bar of Firefox:Press Enter.b. Now you're being presented with a warning. Ignore it and click on the button "I accept the risk!".c. Copy/paste the following into the filter bar (search bar):Toggle its value toby double-clicking it: this will disable "cache to disk" entirely.d. Now you're going to make sure that "cache to RAM" is enabled. Copy/paste the following into the filter bar (search bar):This should already be set to; if not, toggle it to true by double-clicking it.e. Then you're going to determine how much memory can be used as RAM cache. Copy/paste this into the filter bar (search bar):It should exist already (if not, create it now). The currentwill probably be, which automates the size of the RAM cache dependent on the amount of RAM. Set it to(KB, which equals 300 MB). That's usually enough for all amounts of RAM.f. Close Firefox and launch it again. You're done! Check it like this:Type in the URL bar:Press Enter.By the way: you'll then also see a mention of an "appcache" which is still present on the disk, but there's no need to move that (much less frequently used) cache to the RAM as well.This is a user preference. Repeat this hack in each user account.7.2. Firefox has a session restore feature, which remembers what pages were opened if Firefox experiences an unexpected shutdown (read: crashes). This feature is neat, but causes many disk writes. Disable it like this:a. Type in the URL bar of Firefox:Press Enter.b. Now you're being presented with a warning. Ignore it and click on the button "I accept the risk!".c. Type in the filter bar:c. Double-click on the item called. The default interval is, which means 15 seconds. Add three zeros to the existing value, so that it becomes:and click the OK button.d. Close Firefox and launch it again. Now you've practically disabled the session restore feature.Leave the other cache and sessionstore settings as they are: usually, the less invasive a hack is, the better. Because this reduces the risk of unexpected unwanted side effects.This is a user preference. Repeat this hack in each user account.8. In your Firefox profile there's an sqlite database called Places, which after a while starts resembling a swollen Swiss cheese with holes. That might slow your Firefox down.You can speed your Firefox up a bit, by optimizing (vacuuming) that database: you can namely deflate that swollen Swiss cheese into a compact smaller cheese. As follows:Type the followingof Firefox:Press Enter.Almost at the bottom of the page you get to see then, there's a header called. Click there on the button calledYou're done! Repeat this on a monthly basis, so that your Firefox won't lose speed again because of a swollen database.9. Does your system have lots of RAM memory? If it has at least 8 GB, then you can probably speed up your system a bit by placingon apartition. Which means, translated into ordinary language: you bring about that temporary files will not be placed on the hard disk anymore, but on a virtual RAM disk instead.This is how you do it:a. Launch a terminal window.b. Copy/paste this blue line into the terminal (it's one line!):Press Enter. Type your password when prompted.Press Enter again.c. Then copy/paste this command into the terminal:Press Enter.d. Reboot your computer.e. After the reboot: check whether it works, with this terminal command: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.do not apply this on systems with less RAM than 8 GB! Because then this tweak might not make them faster, but (much) slower.9.1. Do you wish to undo tmpfs? Then copy/paste this line into the terminal:Press Enter. Type your password when prompted.Press Enter again.Afterwards, reboot your computer.10. For some wireless chipsets, a simple tweak is sufficient for increasing the speed and the connection quality of your wireless internet. Namely disabling the power management for the wireless chipset.The price you pay is obviously an increase in power consumption, although this increase isn't big.There are two ways to do it: an easy way and a harder way. Below I describe both methods.10.1. The easiest way to speed up your wireless internet connection by disabling power management for the WiFi chipset, goes like this:a. First you need to find out whether Mint applies power management to your WiFi chipset. For this, launch a terminal window.b. Type in the terminal:Press Enter.You can then not only see the name for your wireless chipset (for example:), but also whether Power Management isfor it. When it's, or when no mention is made of Power Management at all, you don't need to do anything.When Power Management is on, proceed as follows:c. Use copy/paste for transferring the following line into the terminal (don't try to type it!):Press Enter. Type your password when prompted.Press Enter again.d. Reboot your computer.e. Then check in the terminal, by the command, whether Power Management for the wireless chipset isnow.If so, you're done!10.2. You can also edit a configuration file by hand, in order to disable power management for the Wifi chipset. It's a bit more difficult than the method described in item 10.1, but it you can do that as follows:a. First you need to find out whether Mint applies power management to your wireless chipset. For this, launch a terminal window.b. Type in the terminal:Press Enter.You can then not only see the name for your wireless chipset (for example:), but also whether Power Management isfor it. When it's, or when no mention is made of Power Management at all, you don't need to do anything.c. When Power Management is on, proceed as follows.In order to prevent typo's, copy/paste this line into the terminal (it's one line!):Press Enter.d. Now a text file opens. In that text file, you see the following content:ChangeintoSave the modified file and close it.e. Reboot your computer.f. Then check in the terminal, by the command, whether Power Management for the wireless chipset isnow.If so, you're done!11. If you have a (reasonably) modern wireless chipset from Intel, it'll run on thedriver. If so, you might be able to increase its speed noticeably, by turning onfor it.The purpose of AMPDU is to improve data transmission by aggregating or grouping together several sets of data. Thus it sharply reduces the amount of transmission overhead.It used to be "on" by default in the iwlwifi driver. But several years ago, it was turned off because of stability issues on a few wifi chipsets. This problem affects, however, only a minority of chipsets...For turning it on, proceed like this:a. First check whether your chipset runs on the iwlwifi driver:Launch a terminal window. Use copy/paste to transfer this line into the terminal:Press Enter.Does the terminal output contain the word(in red letters)? If so, proceed with the next step.b. Use copy/paste to transfer the following blue line (it's one line!) to the terminal. Don't type it; it's too easy to make typing errors:Press Enter. Type your password when prompted.Press Enter again.Don't be confused by the name of the option: when it's set to 8, you don't actually disable anything but yousomething.c. Reboot your computer.d. Finally, check your new wireless speed, for example on speedtest.net Has your wifi become unstable? Then undo the iwlwifi hack as described below.11.1. Does the iwlwifi hack create stability issues for your wifi? Then undo it with the following terminal command:Then reboot. All should be then, as it was before.12. Especially on low-powered machines,(which periodically creates a system-wide file search database) can tax the system resources too heavily. That file search database isn't very useful anyway, so you might benefit from removing(or, if that's installed instead of).For that, proceed as follows:a. Launch a terminal window.b. Copy/paste this blue line into the terminal:Press Enter. Type your password when prompted.Press Enter again.12.1. Does removingcause any problems for you? Then re-install it with the following terminal command:All should be then, as it was before.13. Have you enabled the firewall ufw (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:a. Launch a terminal window.b. Copy/paste this blue line into the terminal:Press Enter. Type your password when prompted.Press Enter again.13.1. Do you want to enable logging by the firewall again? Then use the following terminal command to turn firewall logging on again with the default amount of activity (low):All should be then, as it was before.14. For each displayed local picture, Mint automatically creates a thumbnail, for easy browsing in the file manager. This might impact performance, when you're dealing with a lot of pictures.... Furthermore, it's a usual suspect for memory leaks. This is how to tame this feature a bit:a. In Mint Cinnamon's file manager, Nemo, you can reduce the activity of the thumbnailer service as follows:Launch your file manager (Nemo) - panel: Edit - PreferencesTab- section- Only for files smaller than: change that toOn very old and slow machines it's better to disable thumbnailing entirely in that dialog window, by settingto(instead of the default setting, which isClose Nemo.b. You can also install a small stand-alone file manager called SpaceFM, which behaves itself a bit better with thumbnails than Cinnamon's Nemo or MATE's Caja. For that, proceed like this:First install the GTK3 edition of SpaceFM (not the default GTK2 edition). In the terminal:Press Enter. Type your password when prompted.Press Enter again.Launch SpaceFM, open a folder with images in it, and then in its panel: View - Preferences - tab: select15. If you rarely use Bluetooth, you can probably increase the battery life of your laptop a lot by disabling the Bluetooth(instead of simply disabling the Bluetooth). Like this:a. Launch a terminal window.b. Copy/paste this blue line into the terminal (it's one line!):Press Enter. Type your password when prompted.Press Enter again.c. Reboot your computer.15.1. Do you want to enable Bluetooth again? Then proceed as follows:a.re-enabling Bluetooth can be done with this terminal command:This will instantly re-enable Bluetooth, but it won't survive a reboot.b.re-enabling of Bluetooth can be achieved by the following terminal command which removes the Bluetooth module from the blacklist:Then reboot your computer. Bluetooth should be available again permanently.16. A clean Mint will perform better than a Mint that has become polluted too much by file debris and disordered settings (although pollution is much less of a problem than in Windows). This is how to clean Linux Mint 17. Do you want more tips and tweaks? There's a lot more of them on this website!For example: