Swapspace

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
davidy
Posts: 818
Joined: Sat Jul 03, 2021 1:59 pm

Swapspace

#1 Post by davidy »

I realized just the other day that MX23.3 configures the zramswap service to run by default and removes the actual swap partition itself. Swapspace, which is in synaptic (tyvm), dynamically adjusts your swap on demand. I think I have noticed a difference too. Before when using double commander to transfer large or lots of files to my nas it would show a speedy progress and then stop, and then start again, continuously almost on my 2.5GbE line. Now it seems to just transfer more smoothly without all the hiccups. In any case, I was surprised to see it in the repos and wondered why it wasn't installed by default. I had no idea I was running without an actual swap partition the whole time I've been running 23.3 lol. I have no idea if it actually is helping my transfer speeds but there is also the udisks2-zram, zram support for udisks, in synaptic as well. I installed that too for the hell of it lol.
A virtual and dynamic swapspace instead of a static swap partition is kinda cool too I think.
Sys76 LemurPro-mx-23.4, EliteMinis HM90-mx-21.3, Deskmini UM350-phoenixLite win10, Qnap 12tb nas, Protectli FW4C-opnsense(=゜ω゜)

zero privacy = zero security . All MX'd Up
UAP = up above people

User avatar
CharlesV
Global Moderator
Posts: 7056
Joined: Sun Jul 07, 2019 5:11 pm

Re: Swapspace

#2 Post by CharlesV »

Interesting... I would think having all of those on board would be a little problematic. But I suppose that doesnt mean that they are engaged.

I tried dynamic swap a while back ( tyvm ) and had some weird issues when I was deep in blender. I removed it and 'blender issues' went away, so that went off my list. But I should check up on updates to it - possibly something has changed. (I know my machine has since then, so maybe another attempt.)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
siamhie
Global Moderator
Posts: 3214
Joined: Fri Aug 20, 2021 5:45 pm

Re: Swapspace

#3 Post by siamhie »

davidy wrote: Sat Aug 24, 2024 3:30 am I realized just the other day that MX23.3 configures the zramswap service to run by default and removes the actual swap partition itself.

Is that only when you don't select your swap partition during the installation?

Code: Select all

○ zramswap.service
     Loaded: masked (Reason: Unit zramswap.service is masked.)
     Active: inactive (dead)
Description: Linux zramswap setup

Code: Select all

inxi -S -d --swap
System:
  Host: flux23 Kernel: 6.9.12-2-liquorix-amd64 arch: x86_64 bits: 64
  Desktop: Fluxbox v: 1.3.7 Distro: MX-23.3_fluxbox_x64 Libretto May 19
    2024
Drives:
  Local Storage: total: 8.64 TiB used: 1018.26 GiB (11.5%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS500G3XHC-00SJG0
    size: 465.76 GiB
  ID-2: /dev/nvme1n1 vendor: Western Digital model: WDS500G1X0E-00AFY0
    size: 465.76 GiB
  ID-3: /dev/sda vendor: Seagate model: ST8000DM004-2CX188 size: 7.28 TiB
  ID-4: /dev/sdb vendor: Samsung model: SSD 870 EVO 500GB size: 465.76 GiB
  Message: No optical or floppy data found.
Swap:
  ID-1: swap-1 type: partition size: 64 GiB used: 0 KiB (0.0%) dev: /dev/sdb2
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
dolphin_oracle
Developer
Posts: 22003
Joined: Sun Dec 16, 2007 12:17 pm

Re: Swapspace

#4 Post by dolphin_oracle »

davidy wrote: Sat Aug 24, 2024 3:30 am I realized just the other day that MX23.3 configures the zramswap service to run by default and removes the actual swap partition itself.
it does not. zramswap is used by the installer in case swap isn't present, but its not configured by default on installed systems, and the option to use swap partitions or swapfiles is very much there. we also don't remove swap partitions if the are present, but they won't be used unless you tell the installer to use them (custom install option).

if the automatic installer option is used, a swapfile is created rather than a swap partition. but it has nothing to do with zramswap.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

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

Re: Swapspace

#5 Post by AK-47 »

Even if zramswap is enabled, it doesn't remove any partitions or stop the swap file being configured, it just configures zram in addition to whatever swap space you have told the installer to set up.

User avatar
davidy
Posts: 818
Joined: Sat Jul 03, 2021 1:59 pm

Re: Swapspace

#6 Post by davidy »

I installed mx 23.3 totally clean and let it use entire disk. It removed the swap space that I know I had when I was running 21.3. I sure as hell didn't. Either that or both gparted and gnome-disks no longer see swap. Not only that I know my swap in 21.3 was just a tad over my actual 16GB of ram. Fastfetch says I have one that's 19.72Gb with 0% used. Zram is running and configured too but I know nothing about that either.
Image
Got me. Besides when you let an installer "use entire disk" doesn't that literally mean you don't have to partition anything?? Seems like maybe my memory is bad -Nope. I distinctly remember writing down the actual sizes of all my partitions for future reference when I installed 21.3 a few years back. Trying to find those figures now. Funny how fastfetch says I have one but neither gparted nor gnome-disks actually sees it. I have noticed my transfer speeds are a bit smoother. The joys of an invisible swap. The only thing that doesn't work anymore is suspend. Hibernate works fine and I use it every day.
Strange. even if myOS disk was brand spanking new and I told mx to install clean using entire disk, that requires zero partition management last I checked. Where the invisible swap is is a mystery unto mx. MAGIC it be. lol
ESP 256MB
Root 915.22GB
Swap 16.04GB
Last edited by davidy on Mon Aug 26, 2024 7:11 pm, edited 1 time in total.
Sys76 LemurPro-mx-23.4, EliteMinis HM90-mx-21.3, Deskmini UM350-phoenixLite win10, Qnap 12tb nas, Protectli FW4C-opnsense(=゜ω゜)

zero privacy = zero security . All MX'd Up
UAP = up above people

User avatar
siamhie
Global Moderator
Posts: 3214
Joined: Fri Aug 20, 2021 5:45 pm

Re: Swapspace

#7 Post by siamhie »

What does lsblk report?
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
davidy
Posts: 818
Joined: Sat Jul 03, 2021 1:59 pm

Re: Swapspace

#8 Post by davidy »

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
zram0 254:0 0 256M 0 disk [SWAP]
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 256M 0 part /boot/efi
└─nvme0n1p2 259:2 0 931.3G 0 part /
nvme1n1 259:3 0 931.5G 0 disk
└─nvme1n1p1 259:4 0 931.5G 0 part /mnt/nvme1n1p1

Does this mean zram is my swap from the efi/boot?? Whatever you do please don't tell me I have to start over if in fact I do need an actual swap. Btw, I didn't 'configure' anything of the installer process but a couple services I knew I would not be using and of course the login stuff and timezone. That's it. I literally let the installer do what it does/did/didn't.
Last edited by davidy on Mon Aug 26, 2024 7:20 pm, edited 1 time in total.
Sys76 LemurPro-mx-23.4, EliteMinis HM90-mx-21.3, Deskmini UM350-phoenixLite win10, Qnap 12tb nas, Protectli FW4C-opnsense(=゜ω゜)

zero privacy = zero security . All MX'd Up
UAP = up above people

User avatar
dolphin_oracle
Developer
Posts: 22003
Joined: Sun Dec 16, 2007 12:17 pm

Re: Swapspace

#9 Post by dolphin_oracle »

like i said, if the auto install is used (whole disk) then a swapfile (not a partition) is created. by default, mounted under /swap I think.

if you had included your quick-system-info, we would know what swap is enabled.

also

Code: Select all

swapon --show
Last edited by dolphin_oracle on Mon Aug 26, 2024 7:21 pm, edited 1 time in total.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
davidy
Posts: 818
Joined: Sat Jul 03, 2021 1:59 pm

Re: Swapspace

#10 Post by davidy »

Code: Select all

Snapshot created on: 20240821_1231
System:
  Kernel: 6.10.6-2-liquorix-amd64 [6.10-6~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 clocksource: tsc
    avail: acpi_pm parameters: audit=0 intel_pstate=disable
    BOOT_IMAGE=/boot/vmlinuz-6.10.6-2-liquorix-amd64 root=UUID=<filter> ro zswap.enabled=1
    zswap.compressor=lz4 zswap.max_pool_percent=50 zswap.zpool=z3fold quiet splash
    resume=UUID=<filter> resume_offset=31789056 mitigations=off vt.cur_default=6 vt.color=2
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 wm: xfwm4 v: 4.18.0 with: xfce4-panel tools:
    avail: xfce4-screensaver vt: 7 dm: LightDM v: 1.32.0 Distro: MX-23.3_ahs_x64 Libretto May 19 2024
    base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Laptop System: System76 product: Lemur Pro v: lemp10 serial: <superuser required> Chassis:
    type: 9 serial: <superuser required>
  Mobo: System76 model: Lemur Pro v: lemp10 serial: <superuser required> UEFI: coreboot
    v: 2021-06-28_f8c3962 date: 05/10/2021
Battery:
  ID-1: BAT0 charge: 33.4 Wh (55.0%) condition: 60.7/73.9 Wh (82.1%) volts: 7.4 min: 7.7
    model: Notebook BAT type: Li-ion serial: <filter> status: discharging
  ID-2: hidpp_battery_0 charge: 24% condition: N/A volts: 3.7 min: N/A model: Logitech G Pro
    Wireless Gaming Mouse type: N/A serial: <filter> status: discharging
CPU:
  Info: model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP arch: Tiger Lake gen: core 11
    level: v4 note: check built: 2020 process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 1
    microcode: 0xB6
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 320 KiB
    desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 627 high: 1248 min/max: 400/2801 boost: enabled scaling: driver: acpi-cpufreq
    governor: ondemand cores: 1: 935 2: 400 3: 1248 4: 400 5: 835 6: 400 7: 400 8: 400
    bogomips: 44851
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  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 status: Vulnerable: __user pointer sanitization and usercopy barriers only;
    no swapgs barriers
  Type: spectre_v2 status: Vulnerable; IBPB: disabled; STIBP: disabled; PBRSB-eIBRS: Vulnerable;
    BHI: Vulnerable
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: CLEVO/KAPOK driver: i915 v: kernel
    alternate: xe arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports: active: eDP-1 empty: DP-1,
    DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:9a49 class-ID: 0300
  Device-2: Chicony USB2.0 Camera driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1
    mode: 2.0 bus-ID: 1-7:26 chip-ID: 04f2:b685 class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm4 v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x1408 built: 2019 res: 1920x1080 hz: 60 dpi: 158
    gamma: 1.2 size: 309x173mm (12.17x6.81") diag: 354mm (13.9") ratio: 16:9 modes: 1920x1080
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris device: 1 drv: swrast gbm:
    drv: iris surfaceless: drv: iris x11: drv: iris inactive: wayland
  API: OpenGL v: 4.6 vendor: intel mesa v: 23.1.2-1~mx23ahs glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2) device-ID: 8086:9a49
    memory: 15.11 GiB unified: yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio driver: snd_hda_intel v: kernel
    alternate: snd_soc_avs,snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:a0c8 class-ID: 0403
  API: ALSA v: k6.10.6-2-liquorix-amd64 status: kernel-api tools: alsactl,alsamixer,amixer
  Server-1: PulseAudio v: 16.1 status: active tools: pacat,pactl,pavucontrol
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel modules: wl bus-ID: 00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Realtek USB 10/100/1G/2.5G LAN driver: r8152 type: USB rev: 3.2 speed: 5 Gb/s
    lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-1:2 chip-ID: 0bda:8156 class-ID: 0000 serial: <filter>
  IF: eth0 state: up speed: 2500 Mbps duplex: full mac: <filter>
  IF-ID-1: wg0-mullvad state: unknown speed: N/A duplex: N/A mac: N/A
  Info: services: NetworkManager
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1
    mode: 1.1 bus-ID: 1-10:5 chip-ID: 8087:0026 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: down bt-service: N/A rfk-block: hardware: no
    software: no address: <filter>
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
Drives:
  Local Storage: total: 1.82 TiB used: 482.61 GiB (25.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 2B2QGXA7 temp: 41.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 2B2QEXM7 temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 931.26 GiB size: 915.57 GiB (98.31%) used: 48.72 GiB (5.3%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) zswap: yes compressor: lz4
    max-pool: 50%
  ID-1: swap-1 type: file size: 19.47 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
  ID-2: swap-2 type: zram size: 256 MiB used: 0 KiB (0.0%) priority: 100 comp: lz4
    avail: lzo,lzo-rle,lz4hc,842,zstd max-streams: 8 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 70.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 0
Repos:
  Packages: pm: dpkg pkgs: 2754 libs: 1432 tools: apt, apt-get, aptitude, nala, synaptic pm: rpm
    pkgs: 0
  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 non-free-firmware non-free contrib main
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm non-free-firmware non-free contrib main
    2: deb http://security.debian.org/debian-security/ bookworm-security non-free-firmware non-free contrib main
    3: deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/home:Alexx2000.list
    1: deb http://download.opensuse.org/repositories/home:/Alexx2000/Debian_12/ /
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://la.mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://la.mxrepo.com/mx/repo/ bookworm ahs
Info:
  Memory: total: N/A available: 15.47 GiB used: 2.63 GiB (17.0%)
  Processes: 343 Power: uptime: 1d 4h 20m states: freeze,standby,mem,disk suspend: s2idle
    avail: shallow wakeups: 0 hibernate: platform avail: shutdown, reboot, suspend, test_resume
    image: 6.15 GiB services: upowerd,xfce4-power-manager Init: SysVinit v: 3.08 runlevel: 5
    default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 Client: shell wrapper v: 5.2.15-release inxi: 3.3.35
Boot Mode: UEFI
Swapon:
NAME TYPE SIZE USED PRIO
/swap/swap file 19.5G 0B -2
/dev/zram0 partition 256M 0B 100
Last edited by davidy on Mon Aug 26, 2024 7:30 pm, edited 2 times in total.
Sys76 LemurPro-mx-23.4, EliteMinis HM90-mx-21.3, Deskmini UM350-phoenixLite win10, Qnap 12tb nas, Protectli FW4C-opnsense(=゜ω゜)

zero privacy = zero security . All MX'd Up
UAP = up above people

Post Reply

Return to “Tips & Tricks by users”