More RAM Without Adding RAM? How to Configure ZRAM on TUXEDO OS - TUXEDO Computers

  • Notebooks
    • Notebooks/Laptops with preinstalled and configured Linux and more. TUXEDO Computers are individually built computers and PCs being fully Linux-suitable, custom tailored Linux hardware so to say. We deliver all TUXEDOs ready to go so you only ha...
    • 10-14 inch
    • 15-16 inch
    • 17 inch
    • Immediate shipping
    • Business notebooks
    • Gaming-Notebooks
    • Mobility notebooks
    • Deep Learning AI
    • All Notebooks
  • Computers / PCs
    • Computers / PCs with Linux preinstalled & more TUXEDO Computers are individually built computers and PCs being fully Linux-suitable, custom tailored Linux hardware so to say :) We deliver all TUXEDOs ready to go so you only have to unwrap,...
    • Mini Systems
    • Midi Systems
    • Maxi Systems
    • AMD Systems
    • Intel Systems
    • All Systems
  • Accessories
    • Here you will find accessories, components and peripherals for your TUXEDO system. Nothing suitable found here? Get in touch with us directly!
    • Batteries
    • Displays
    • Dockingstations
    • Books
    • Input Devices & Peripherals
    • Bags & Sleeves
    • Notebook Power Supplies & Cords
    • Components & Complements
      • Cables
      • Drives
      • Hard Disk Drives 2.5"
      • PC Power Supplies
      • SSDs 2.5"
      • SSDs m.2 (SATAIII and NVMe)
      • WiFi, LAN & Mobile Network
      • Licenses
  • B2B
    • In this category you can find equipment for your company, office, school, university or educational institution and servers and solutions. Appliances with CRM, ERP and merchandise management, cloud storage, cloud server for self-hosting, services...
    • Business notebooks
    • Business computers
  • Novelties
  •  
    • Notebooks
      • 10-14 inch
      • 15-16 inch
      • 17 inch
      • Immediate shipping
      • Business notebooks
      • Gaming-Notebooks
      • Mobility notebooks
      • Deep Learning AI
      • All Notebooks
    • Computers / PCs
      • Mini Systems
      • Midi Systems
      • Maxi Systems
      • AMD Systems
      • Intel Systems
      • All Systems
    • Accessories
      • Batteries
      • Displays
      • Dockingstations
      • Books
      • Input Devices & Peripherals
      • Bags & Sleeves
      • Notebook Power Supplies & Cords
      • Components & Complements
        • Cables
        • Drives
        • Hard Disk Drives 2.5"
        • PC Power Supplies
        • SSDs 2.5"
        • SSDs m.2 (SATAIII and NVMe)
        • WiFi, LAN & Mobile Network
        • Licenses
    • B2B
      • Business notebooks
      • Business computers
    • Novelties
  • Settings

  • Deutsch
  • English

  • Customer Account

  • Log in
  ATTENTION: To use our store you have to activate JavaScript and deactivate script blockers!  
Thank you for your understanding!

More RAM Without Adding RAM? How to Configure ZRAM on TUXEDO OS

2026-02-23 17:12:13

Given the high cost of memory and the tense market situation, many buyers of new computers consider cutting back on RAM. For numerous tasks, a smaller configuration may seem sufficient at first. In everyday use, however, bottlenecks can appear quickly. When physical RAM becomes scarce, Linux moves data to the significantly slower swap area on the SSD or hard drive — noticeable through stuttering applications, delayed responses, and an overall less responsive desktop.

This is where ZRAM comes into play: the technology built into the Linux kernel creates a compressed block device directly in memory that acts as additional swap space. Instead of writing data immediately to the slower drive, it is first compressed and stored in RAM. As a result, more information remains in fast main memory, and the system accesses the disk less frequently. The trade-off is a slightly higher CPU load due to compression — typically negligible in practice.

  • Initial situation: Installation with swap space
  • Installing ZRAM and checking its current status
  • When is it worth adjusting the ZRAM size?
    • Adjusting the ZRAM size
    • Changing the ZRAM compression algorithm

Initial situation: Installation with swap space

For illustration, let us look at a productively used notebook running TUXEDO OS. The system is equipped with 32 GB of RAM and an equally sized 32 GB swap file located at /swapfile in the root directory. This is explicitly not a fresh installation: several services and everyday applications are already running in the background. Immediately after booting into the Plasma desktop, the system therefore occupies around 7 GB of RAM, while the swap area remains unused at first.

You can check the current status on your system using free -m or swapon -s, or graphically via the System Monitor in KDE Plasma.

free -m
(out)               total        used        free      shared  buff/cache   available
(out)Mem:           31834        7112       22974         291        2440       24721
(out)Swap:          32767           0       32767
swapon -s
(out)Filename				Type		Size		Used		Priority
(out)/swapfile                               file		33554428	0		-2
KDE System Monitor with active ZRAM: 32 GB RAM, 32 GB swap, and an additional 16 GB of compressed ZRAM illustrate the system’s extended effective memory usage.
KDE System Monitor with active ZRAM: 32 GB RAM, 32 GB swap, and an additional 16 GB of compressed ZRAM illustrate the system’s extended effective memory usage.

Installing ZRAM and checking its current status

On TUXEDO OS — just as on Ubuntu — you can conveniently enable ZRAM via the zram-config package. Install it using the following command. A reboot is usually required afterward; no manual basic configuration is necessary, as the system sets up ZRAM automatically.

sudo apt install zram-config

After rebooting, use zramctl to verify that the system has created the ZRAM device correctly. By default, the preset reserves about half of the available RAM for ZRAM. On a machine with 32 GB of RAM, you will therefore see an additional ZRAM device of roughly 16 GB alongside the classic swap area. The free -m tool combines ZRAM and traditional swap into a single swap total.

swapon -s
(out)Filename				Type		Size		Used		Priority
(out)/swapfile                               file		33554428	0		-2
(out)/dev/zram0                              partition	16299324	0		5
zramctl
(out)NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
(out)/dev/zram0 lzo-rle      15,5G   4K   74B   12K      20 SWAP
free -m
(out)               total        used        free      shared  buff/cache   available
(out)Mem:           31834        6522       23989         128        1845       25312
(out)Swap:          48685           0       48685

When is it worth adjusting the ZRAM size?

The optimal size depends heavily on your usage scenario. The key factors are how well your typical data can be compressed and how severely your system suffers from memory pressure.

  • Multimedia and video editing: Audio and video data are often already compressed. Additional compression by ZRAM provides limited benefit here. In such cases, it may make sense to allocate less memory to ZRAM and instead enlarge the traditional swap area.
  • Databases or highly compressible data: Text-heavy or structured data often benefits significantly from compression. A larger ZRAM partition can noticeably improve system responsiveness.

Adjusting the ZRAM size

The size of ZRAM is defined via the init-zram-swapping script located in /usr/bin/:

#!/bin/sh
modprobe zram

# Calculate memory to use for zram (1/2 of ram)
totalmem=LC_ALL=C free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/  *.*//'
mem=$((totalmem / 2 * 1024))

# initialize the devices
echo $mem > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon -p 5 /dev/zram0

Open the file with administrative privileges in a text editor of your choice:

sudo nano /usr/bin/init-zram-swapping

Locate the line starting with mem=. By default, it reserves half of the available RAM. If you want to adjust the size, modify the multiplication factor accordingly:

  • Reduce: For example, replacing 1024 with 512 limits ZRAM to one quarter of the total RAM.
  • Increase: Setting the factor to 1536 allocates roughly three quarters of the RAM to ZRAM.

Save the file and reboot the system for the changes to take effect.

Changing the ZRAM compression algorithm

By default, ZRAM typically uses LZO or LZO-RLE. These algorithms require little CPU power and therefore represent a good compromise. Modern processors, however, often handle ZSTD without difficulty, offering a higher compression ratio and thus potentially more effective memory gain.

First, check which algorithms are available:

cat /sys/block/zram0/comp_algorithm
(out)lzo-rle lzo lz4 lz4hc zstd deflate 842 

Then modify the init-zram-swapping script. Locate the following line:

…
echo $mem > /sys/block/zram0/disksize
…

Insert a new line directly above it to define the desired algorithm:

…
echo zstd > /sys/block/zram0/comp_algorithm
echo $mem > /sys/block/zram0/disksize
…

Save the file and reboot the system. Finally, use zramctl to verify that the new compression algorithm is active.

Service & Support

Welcome to TUXEDO Support - how can we help you?

Linux at TUXEDO

Are you wondering if Linux is right for you? Our team will be happy to answer your questions and explain details about the free operating system at TUXEDO.
Let the advantages and services convince you!

Hardware

Notebook, PC, both - and which model? Our technical service team also provides advice on selection, equipment and puts together suitable offers for your technical requirements.

Questions and Answers

Frequently asked questions and the corresponding answers can be found here. If you cannot find a solution to your problem here, it is also worth taking a look at the instructions section.


Find out more

Instructions and Tips

Most situations can be solved quickly and easily by yourself. This saves you time and you can use your device directly again. We provide you with instructions, first steps and short tips for all TUXEDO models.


Find out more

System Recovery

Even in the case of a case, you don't have to rely on us: Your device can be reset to the factory settings - completely automatically! Everything is included with your order and you can get started right away.


Find out more

Technical Service

Our competent technicians are also happy to help with service requests. You have different possibilities to contact us. We are personally there for you Monday to Friday from 9 am to 1 pm and from 2 pm to 5 pm. But also outside these times, you can contact our team with your request by e-mail.
An extra function is available in your customer account for repair requests (RMA).

 

Contact

We are personally there for you Monday to Friday from 9 am to 1 pm and from 2 pm to 5 pm (German time). But also outside these times, you can contact our team with your request by e-mail. You will receive confirmation of receipt within approximately 15 minutes. If not, please feel free to contact us by phone. Please include your order number, the model name of your laptop or PC and as detailed a description of your request as possible. The more details you give us, the faster we can process your request!

We might not be able to answer questions about third party hardware or software. For questions about popular open source software (Thunderbird, Filezilla...) please contact a forum e.g. ubuntuforums.org. The research effort for application specific setup is immense and not manageable at the current time. Basic compatibility questions e.g. are of course still welcome!

An extra function is available in your customer account for repair requests (RMA).

 

Image of Tux

Linux compatible
image of 5 years warranty badge

Up to 5 Years Warranty
stylized image of a Rocket

Immediately ready for use
image of germany with a wrench in the center

Assembled in Germany
image of germany with a section sign in the center

German Data Privacy
stylized image of a tech support worker

German Tech Support

Guidance

  • Service & Support
  • B2B


Mo - Fr: 9-13 & 14-17h
+49 (0) 821 / 8998 2992

About TUXEDO

  • Why TUXEDO
  • TUXEDO Control Center
  • TUXEDO Tomte
  • TUXEDO WebFAI
  • TUXEDO OS
  • TUXEDO Aquaris
  • Individual logos and keyboards

Help & Support

  • Downloads & Drivers
  • System Diagnostics
  • Frequent questions (FAQ)
  • Instructions
  • Help with my device
  • Revocation right
  • Shipping costs & delivery times
  • Payment methods

News & more

  • News & Blog
  • Press
  • Newsletter
  • Event Calendar
  • Jobs & Career
  • Sponsoring

Community


Your Linux specialist since 2004

  • Accessibility
  • Privacy policy
  • Imprint
  • Battery disposal
  • Conditions of Use

Shipping costs & delivery times

We ship your order to almost all countries, in Europe mostly even free of charge! The respective shipping costs and the cost threshold above which we will cover the costs for you can be found here or for international shipping in the table below.

 


Free shipping within Germany

There are no shipping costs within Germany for goods worth €100 or more.

 

7.99 € shipping cost at max!

No matter how many small articles you order, such as USB stick card reader, LAN adapters or fan articles, with us, you pay a maximum of 7.99 € shipping costs.

  • 7.99 € shipping fee for all orders below 100 € of goods
  • Free shipping from 100 € total value of goods

You can check all occurring shipping costs or if we even deliver for free right before sending your order!

 


International delivery

Here are the shipping costs as well as the amount threshold for your order. The threshold is referring to the total amount of your order, which enables free shipping.
 

Taxes and customs outside the EU:

For orders outside the EU there might be additional duties, taxes or charges needed to be paid by the customer. These don't have to be paid to the supplier, but to local authorities. Please check for any details with your local customs or tax authorities before ordering! But as a benefit you don't have to pay German taxes, this means you save up to 19%!
Due to the Brexit and the associated changes, there may be delays of several days in customs clearance on site for deliveries to the UK. This is not within our sphere of influence.

The processing of orders outside the EU may currently be subject to significant delays due to the respective customs authorities. Unfortunately, we have no influence over this and therefore ask you to check your shipment tracking daily. If the status of your shipment does not change for more than a week, please contact our customer service.

Thank you for your understanding!

 

 
⚠️   Countries to which we unfortunately cannot ship, and information on how you can still order from us, can be found here!
Country Shipping Fee Free Shipping From
Albania 99,00 EUR -
Andorra 59,00 EUR -
Belarus
(Temporarily no delivery possible)
59,00 EUR -
Belgium 8,49 EUR 100 EUR
Bulgaria 15,99 EUR 160 EUR
Denmark 8,49 EUR 100 EUR
Estonia 15,99 EUR 160 EUR
Faroe Islands 129,00 EUR -
Finland 14,99 EUR 150 EUR
France
(Overseas France excluded)
9,99 EUR 120 EUR
Greece 22,90 EUR -
United Kingdom
(Overseas Territories excluded)
9,99 EUR 120 EUR
Hong Kong 199,00 EUR -
India 199,00 EUR -
Ireland 14,99 EUR 150 EUR
Island 129,00 EUR -
Italy 9,99 EUR 120 EUR
Japan 99,00 EUR -
Canada 99,00 EUR -
Croatia 34,90 EUR 500 EUR
Latvia 15,99 EUR 160 EUR
Lithuania 15,99 EUR 160 EUR
Luxembourg 8,49 EUR 100 EUR
Macau 199,00 EUR -
Malta 34,90 EUR 500 EUR
Macedonia 59,00 EUR -
Moldova 199,00 EUR -
Monaco 19,00 EUR -
Montenegro 99,00 EUR -
Netherlands
(Dutch Carribean excluded)
8,49 EUR 100 EUR
Norway 14,99 EUR 150 EUR
Austria 8,49 EUR 100 EUR
Poland 15,99 EUR 160 EUR
Portugal 14,99 EUR 150 EUR
Romania 15,99 EUR 160 EUR
San Marino 9,99 EUR 120 EUR
Sweden 14,99 EUR 150 EUR
Switzerland 13,99 EUR 150 EUR
Serbia 34,90 EUR 500 EUR
Singapore 199,00 EUR -
Slovakia 15,99 EUR 160 EUR
Slovenia 15,99 EUR 160 EUR
Spain
(Canary Islands excluded)
14,99 EUR 150 EUR
Czech Republic 15,99 EUR 160 EUR
Ukraine
(Temporarily no delivery possible)
129,00 EUR -
Hungary 15,99 EUR 160 EUR
USA
(including Hawaii)
99,00 EUR -
United Arabic Emirates 199,00 EUR -
Cyprus 34,90 EUR 500 EUR
Qatar 199,00 EUR -
⚠️ Countries to which we unfortunately cannot ship, and information on how you can still order from us, can be found here!

 


Time of delivery

If not stated differently in the article's description, we deliver goods in:

  • 7-10 working days within Germany
  • 10-12 working days outside Germany

For orders paid in advance, the delivery time starts with receipt of the payment. Please keep in mind that there is no delivery on Sundays or on holidays.
For goods delivered as download, there will be no shipping fees due.
Access data for downloads are sent out via e-mail 1-3 working days after contract formation. For orders with advanced payment, we will deliver after receiving the payment. You can download the item by using the link sent to you via e-mail.

Self-pick-up of orders is not possible, unfortunately.