Swap Partition or file and where?

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
JesusLinux
Posts: 74
Joined: Fri Aug 16, 2024 4:47 pm

Re: Swap Partition or file and where?

#11 Post by JesusLinux »

Eadwine Rose wrote: Fri Feb 21, 2025 1:36 am "and forget about it until it becomes a problem" <-- to me that IS a problem, 'cause I would not sit easy with that. But YMMV of course.

That swap partition is easiest, and if it is big enough (I have 8gb, I don't use hybernate or stuff like that, all is fine) it will never become a problem.
My harddrive is 500Gb, before that had 250gb. My partitions are like so:

500mb efi
80gb root (40 on the 250 drive)
8Gb swap
the rest is home


Standard user here, nothing fancy, been using this install for quite a while now. 1mb in use on the efi, 26gb used on root, nothing on swap that I have ever seen, and the home has about 1/3rd in use.

Just my 2 cts. :smile:
The setup I have in mind is about that.
But I put /home on 500GB HDD.
All the other partitions on 120GB SSD including 8GB swap.

User avatar
Eadwine Rose
Administrator
Posts: 14417
Joined: Wed Jul 12, 2006 2:10 am

Re: Swap Partition or file and where?

#12 Post by Eadwine Rose »

Never used two drives to install on, interesting. Good luck on the endeavor!
MX-23.6_x64 July 31 2023 * 6.1.0-34amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
AK-47
Developer
Posts: 1189
Joined: Sun Mar 24, 2019 7:04 pm

Re: Swap Partition or file and where?

#13 Post by AK-47 »

One drive for system and one for home is a sensible choice for safety. Also now you can get 1TB SSDs for a reasonable price.
If you are swapping on so regularly it is affecting your performance as to need it to be on an SSD, you could either get more RAM or have a look at the swappiness setting:

Code: Select all

$ sysctl vm.swappiness
vm.swappiness = 15
$ sudo sysctl vm.swappiness = 0
The lower this value, the more expensive the kernel assumes the swap is. Zero means don't swap until the physical memory is exhausted.
https://github.com/torvalds/linux/blob/ ... ctl/vm.rst
The gods of Linux documentation wrote:This control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.

Keep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap's random IO. An optimal value will require experimentation and will also be workload-dependent.

The default value is 60.

For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).

At 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.
To make it permanent, add the line to /etc/sysctl.conf:

Code: Select all

vm.swappiness = 1

User avatar
JesusLinux
Posts: 74
Joined: Fri Aug 16, 2024 4:47 pm

Re: Swap Partition or file and where?

#14 Post by JesusLinux »

AK-47 wrote: Fri Feb 21, 2025 5:37 pm One drive for system and one for home is a sensible choice for safety. Also now you can get 1TB SSDs for a reasonable price.
If you are swapping on so regularly it is affecting your performance as to need it to be on an SSD, you could either get more RAM or have a look at the swappiness setting:

Code: Select all

$ sysctl vm.swappiness
vm.swappiness = 15
$ sudo sysctl vm.swappiness = 0
The lower this value, the more expensive the kernel assumes the swap is. Zero means don't swap until the physical memory is exhausted.
https://github.com/torvalds/linux/blob/ ... ctl/vm.rst
The gods of Linux documentation wrote:This control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.

Keep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap's random IO. An optimal value will require experimentation and will also be workload-dependent.

The default value is 60.

For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).

At 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.
To make it permanent, add the line to /etc/sysctl.conf:

Code: Select all

vm.swappiness = 1
I think my "swappines" is set to 10 on the other machines.
The RAM on my laptops is at max capacity.
Since these machines are old buying a larger SSD is out of the question since for 4 out of my 5 laptops are pre 2015. A larger SSD is worth much more than the laptops.
That's why I bought the cheapest Kingston SSD...

User avatar
AK-47
Developer
Posts: 1189
Joined: Sun Mar 24, 2019 7:04 pm

Re: Swap Partition or file and where?

#15 Post by AK-47 »

@JesusLinux Let's see what you are working with here. Can you please run the Quick System Info utility on the machine you are trying to set up and post the QSI report to the forum.

User avatar
Pierre
Posts: 321
Joined: Thu Apr 19, 2007 9:23 am

Re: Swap Partition or file and where?

#16 Post by Pierre »

another thought is, that I;ve usually set an Swap Partition . .
- to either 2Gb or to 4Gb in size -
and yet have Never seen any use-age above ~800 Gb in System Monitor.
Please use the check-mark icon to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
JesusLinux
Posts: 74
Joined: Fri Aug 16, 2024 4:47 pm

Re: Swap Partition or file and where?

#17 Post by JesusLinux »

AK-47 wrote: Fri Feb 21, 2025 10:40 pm @JesusLinux Let's see what you are working with here. Can you please run the Quick System Info utility on the machine you are trying to set up and post the QSI report to the forum.

Code: Select all

Snapshot created on: 20250202_2320
System:
  Kernel: 6.1.0-28-amd64 [6.1.119-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: lang=en_US
    kbd=pt tz=Europe/Lisbon
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.3_x64 Libretto August 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Hewlett-Packard product: HP Pavilion g6 Notebook PC
    v: 0791100000205610000620100 serial: <superuser required> Chassis: type: 10
    serial: <superuser required>
  Mobo: Hewlett-Packard model: 1840 v: 56.32 serial: <superuser required> UEFI-[Legacy]: Insyde
    v: F.27 date: 09/07/2016
CPU:
  Info: model: Intel Pentium B970 bits: 64 type: MCP arch: Sandy Bridge level: v2 built: 2010-12
    process: Intel 32nm family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x28
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
    L2: 512 KiB desc: 2x256 KiB L3: 2 MiB desc: 1x2 MiB
  Speed (MHz): avg: 846 high: 894 min/max: 800/2300 scaling: driver: intel_cpufreq
    governor: ondemand cores: 1: 894 2: 798 bogomips: 9179
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling; PBRSB-eIBRS: Not
    affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-6 code: Sandybridge process: Intel 32nm built: 2011 ports:
    active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0106 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7500M/7600M Series] vendor: Hewlett-Packard driver: N/A
    alternate: radeon, amdgpu arch: TeraScale-2 code: Evergreen process: TSMC 32-40nm built: 2009-15
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6840
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 362x204mm (14.25x8.03") s-diag: 416mm (16.36")
  Monitor-1: LVDS-1 model: LG Display 0x02f2 built: 2011 res: 1366x768 hz: 60 dpi: 101 gamma: 1.2
    size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
  API: OpenGL v: 3.3 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 2000 (SNB GT1)
    direct-render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 7
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 class-ID: 0403
  API: ALSA v: k6.1.0-28-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Ralink vendor: Hewlett-Packard driver: rt2800pci v: 2.3.0 modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 07:00.0 chip-ID: 1814:539a class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 08:00.0 chip-ID: 10ec:8136
    class-ID: 0200
  IF: eth0 state: down mac: <filter>
Drives:
  Local Storage: total: 747.93 GiB used: 0 KiB (0.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HTS545050A7E380 size: 465.76 GiB block-size:
    physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: A7A0
    scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37240G size: 223.57 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 1103 scheme: MBR
  ID-3: /dev/sdc maj-min: 8:32 type: USB model: N/A size: 58.59 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 2.00 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  Message: No partition data found.
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 51.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2291 pm: dpkg pkgs: 2282 libs: 1159
    tools: apt,apt-get,aptitude,gnome-software,nala,synaptic pm: rpm pkgs: 0 pm: flatpak pkgs: 9
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://ftp.rnl.tecnico.ulisboa.pt/pub/mxlinux-packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/spotify.list
    1: deb http://repository.spotify.com stable non-free
Info:
  Processes: 216 Uptime: 5m wakeups: 2 Memory: 7.65 GiB used: 2.12 GiB (27.7%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
Video Tweaks:
Detected possible Hybrid Graphics

I'm running this session live from a USB snapshot from other laptop. I want to use this installation snapshot.
I managed to upgrade from Win 10 to Win 11 on this machine and it's fine so far. Slower compared to W10.
I want to dual boot W11 with MX Linux.
In case W11 goes crazy I delete it.

This snapshot is from a laptop with only one SSD. So /root and /home are in the same partition.

User avatar
JesusLinux
Posts: 74
Joined: Fri Aug 16, 2024 4:47 pm

Re: Swap Partition or file and where?

#18 Post by JesusLinux »

Pierre wrote: Sat Feb 22, 2025 1:36 am another thought is, that I;ve usually set an Swap Partition . .
- to either 2Gb or to 4Gb in size -
and yet have Never seen any use-age above ~800 Gb in System Monitor.
In an old laptop with only 3GB RAM I have 6 GB Swap partition.
On a laptop with 8GB RAM I have 8 GB Swap partition...
Both only have one SSD drive.

User avatar
JesusLinux
Posts: 74
Joined: Fri Aug 16, 2024 4:47 pm

Re: Swap Partition or file and where?

#19 Post by JesusLinux »

Ok, I installed MX on dual-boot with Win11.

I can boot on both OSes however MX Linux is booting in init instead of systemd so I can't use sudo for upgrades and basic commands.
What is going on?
Here's the info:

Code: Select all

jesuslinux@B-970:~
$ sudo apt update && apt upgrade && flatpak upgrade
[sudo] password for jesuslinux:     
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 3787 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
jesuslinux@B-970:~
$ sudo apt-get update && apt-get upgrade && flatpak upgrade
Hit:1 http://deb.debian.org/debian bookworm-updates InRelease                                                                                        
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease                                                                         
Hit:3 http://deb.debian.org/debian bookworm InRelease                                                                           
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease                                                                  
Hit:5 https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo bookworm InRelease    
Hit:6 http://repository.spotify.com stable InRelease
Reading package lists... Done
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
jesuslinux@B-970:~
$ ps -p 1 -o comm=
init
System info:

Code: Select all

Snapshot created on: 20250202_2320
System:
  Kernel: 6.1.0-30-amd64 [6.1.124-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-30-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.3_x64 Libretto August 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Hewlett-Packard product: HP Pavilion g6 Notebook PC
    v: 0791100000205610000620100 serial: <superuser required> Chassis: type: 10
    serial: <superuser required>
  Mobo: Hewlett-Packard model: 1840 v: 56.32 serial: <superuser required> UEFI-[Legacy]: Insyde
    v: F.27 date: 09/07/2016
CPU:
  Info: model: Intel Pentium B970 bits: 64 type: MCP arch: Sandy Bridge level: v2 built: 2010-12
    process: Intel 32nm family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
    L2: 512 KiB desc: 2x256 KiB L3: 2 MiB desc: 1x2 MiB
  Speed (MHz): avg: 2295 min/max: 800/2300 scaling: driver: intel_cpufreq governor: ondemand
    cores: 1: 2295 2: 2295 bogomips: 9179
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW; STIBP: disabled; RSB
    filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-6 code: Sandybridge process: Intel 32nm built: 2011 ports:
    active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0106 class-ID: 0300
  Device-2: AMD Thames [Radeon HD 7500M/7600M Series] vendor: Hewlett-Packard driver: N/A
    alternate: radeon, amdgpu arch: TeraScale-2 code: Evergreen process: TSMC 32-40nm built: 2009-15
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6840
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 362x204mm (14.25x8.03") s-diag: 416mm (16.36")
  Monitor-1: LVDS-1 model: LG Display 0x02f2 built: 2011 res: 1366x768 hz: 60 dpi: 101 gamma: 1.2
    size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
  API: OpenGL v: 3.3 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 2000 (SNB GT1)
    direct-render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 7
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 class-ID: 0403
  API: ALSA v: k6.1.0-30-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Ralink vendor: Hewlett-Packard driver: rt2800pci v: 2.3.0 modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 07:00.0 chip-ID: 1814:539a class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 08:00.0 chip-ID: 10ec:8136
    class-ID: 0200
  IF: eth0 state: down mac: <filter>
Drives:
  Local Storage: total: 689.33 GiB used: 17.14 GiB (2.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G size: 223.57 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 1103 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Hitachi model: HTS545050A7E380 size: 465.76 GiB
    block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: A7A0 scheme: GPT
Partition:
  ID-1: / raw-size: 69.34 GiB size: 67.7 GiB (97.64%) used: 10.93 GiB (16.1%) fs: ext4
    dev: /dev/sda6 maj-min: 8:6
  ID-2: /boot/efi raw-size: 200 MiB size: 196.9 MiB (98.44%) used: 1 KiB (0.0%) fs: vfat
    dev: /dev/sda5 maj-min: 8:5
  ID-3: /home raw-size: 195.31 GiB size: 191.19 GiB (97.89%) used: 6.21 GiB (3.2%) fs: ext4
    dev: /dev/sdb2 maj-min: 8:18
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.59 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda7
    maj-min: 8:7
Sensors:
  System Temperatures: cpu: 53.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2291 pm: dpkg pkgs: 2282 libs: 1159
    tools: apt,apt-get,aptitude,gnome-software,nala,synaptic pm: rpm pkgs: 0 pm: flatpak pkgs: 9
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/spotify.list
    1: deb http://repository.spotify.com stable non-free
Info:
  Processes: 203 Uptime: 14m wakeups: 2 Memory: 7.65 GiB used: 2.11 GiB (27.6%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

User avatar
AK-47
Developer
Posts: 1189
Joined: Sun Mar 24, 2019 7:04 pm

Re: Swap Partition or file and where?

#20 Post by AK-47 »

Consider doing a system update (should update the kernel) and then enabling zramswap using the MX Service Manager.

If you want, you can increase the maximum allowable usage to 50% by editing /etc/default/zramswap and setting PERCENT=50 (remove the '#' preceding it). This is a percentage of your RAM that can be stored on the swap (the uncompressed contents, not the compressed one).

Post Reply

Return to “General”