Hi
I am on thinkpad x200 with MX19, 4gb ram, 64 bit.
I did not set up the swap partition at the time of installation. To get a swap partition now, here is what I have done:
in gparted, I created 8mb partition, swap one, right click, swapon.
restarted
The swap partition does not appear to have started working, though - see attached picture, although chrome has claimed all ram less 100MB, and I am getting freezes.
can you please help?
[SOLVED] creating swap after the installation
[SOLVED] creating swap after the installation
You do not have the required permissions to view the files attached to this post.
Last edited by TOTAL on Mon Nov 18, 2019 10:00 pm, edited 1 time in total.
Re: creating swap after the installation
Here is system data
[/code]
Code: Select all
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256.2G 0 disk
├─sda1 8:1 0 500M 0 part
├─sda2 8:2 0 148.4G 0 part /media/sda2
├─sda3 8:3 0 512B 0 part
├─sda4 8:4 0 39.9G 0 part /
├─sda5 8:5 0 59.6G 0 part /media/sda5
└─sda6 8:6 0 7.8G 0 part [SWAP]
Code: Select all
[code]
System: Host: TOTAL Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
parameters: BOOT_IMAGE=/boot/vmlinuz-4.19.0-6-amd64
root=UUID=b033579d-3d5b-4d63-832a-7373259139be ro splash resume = /dev/sd6 quiet
Desktop: Xfce 4.14.1 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0
Distro: MX-19_x64 patito feo October 21 2019 base: Debian GNU/Linux 10 (buster)
Machine: Type: Laptop System: LENOVO product: 7459H73 v: ThinkPad X200 serial: <filter>
Chassis: type: 10 serial: <filter>
Mobo: LENOVO model: 7459H73 serial: <filter> BIOS: LENOVO v: 6DET72WW (3.22 )
date: 10/25/2012
Battery: ID-1: BAT0 charge: 0 Wh condition: 42.5/84.2 Wh (50%) volts: 10.7/10.8
model: Panasonic 42T4650 type: Li-ion serial: <filter> status: Charging
CPU: Topology: Dual Core model: Intel Core2 Duo P8600 bits: 64 type: MCP arch: Penryn
family: 6 model-id: 17 (23) stepping: A (10) microcode: A0C L2 cache: 3072 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 9576
Speed: 2284 MHz min/max: 800/2401 MHz boost: enabled Core speeds (MHz): 1: 2394
2: 2458
Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable
Type: l1tf mitigation: PTE Inversion
Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
Type: meltdown mitigation: PTI
Type: spec_store_bypass status: Vulnerable
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, STIBP: disabled, RSB filling
Type: tsx_async_abort status: Not affected
Graphics: Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Lenovo driver: i915
v: kernel bus ID: 00:02.0 chip ID: 8086:2a42
Display: x11 server: X.Org 1.20.4 driver: intel resolution: 1280x800~60Hz
OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express v: 2.1 Mesa 18.3.6
direct render: Yes
Audio: Device-1: Intel 82801I HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel
bus ID: 00:1b.0 chip ID: 8086:293e
Sound Server: ALSA v: k4.19.0-6-amd64
Network: Device-1: Intel 82567LM Gigabit Network vendor: Lenovo driver: e1000e v: 3.2.6-k
port: 1840 bus ID: 00:19.0 chip ID: 8086:10f5
IF: eth0 state: down mac: <filter>
Device-2: Intel Ultimate N WiFi Link 5300 driver: iwlwifi v: kernel port: 1c60
bus ID: 03:00.0 chip ID: 8086:4236
IF: wlan0 state: up mac: <filter>
Drives: Local Storage: total: 256.17 GiB used: 133.36 GiB (52.1%)
ID-1: /dev/sda vendor: Crucial model: CT275MX300SSD1 size: 256.17 GiB block size:
physical: 512 B logical: 512 B speed: 3.0 Gb/s serial: <filter> rev: R031 scheme: MBR
Partition: ID-1: / raw size: 39.87 GiB size: 38.99 GiB (97.80%) used: 19.16 GiB (49.1%) fs: ext4
dev: /dev/sda4
ID-2: swap-1 size: 7.82 GiB used: 512 KiB (0.0%) fs: swap swappiness: 15 (default 60)
cache pressure: 100 (default) dev: /dev/sda6
Sensors: System Temperatures: cpu: 72.0 C mobo: 70.0 C
Fan Speeds (RPM): fan-1: 4348
Repos: Active apt repos in: /etc/apt/sources.list
1: deb http://ftp.debian.org/debian buster-backports main
2: deb http://ftp.debian.org/debian stretch-backports-sloppy main
Active apt repos in: /etc/apt/sources.list.d/antix.list
1: deb https://mirrors.evowise.com/mxlinux-packages/antix/buster/ buster main
Active apt repos in: /etc/apt/sources.list.d/atom.list
1: deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian buster-updates main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian buster main contrib non-free
2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/megasync.list
1: deb https://mega.nz/linux/MEGAsync/Debian_10.0/ ./
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb https://mirrors.evowise.com/mxlinux-packages/mx/repo/ buster main non-free
Active apt repos in: /etc/apt/sources.list.d/opera-stable.list
1: deb https://deb.opera.com/opera-stable/ stable non-free
Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
1: deb [arch=amd64] https://repo.skype.com/deb stable main
No active apt repos in: /etc/apt/sources.list.d/various.list
Info: Processes: 226 Uptime: 7m Memory: 3.75 GiB used: 2.61 GiB (69.6%) Init: SysVinit
v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: bash v: 5.0.3
running in: quick-system-in inxi: 3.0.36
Re: creating swap after the installation
Did you add the swap partition to your fstab file?
We can do this for you with the following command:
The first line should add the swap partition to your fstab file. The second line enables swap. The third line will verify that swap has been enabled. It should then get enabled automatically when you boot.
HTH
We can do this for you with the following command:
Code: Select all
sudo make-fstab --swap-only
sudo swapon -a
free -m
HTH
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: creating swap after the installation
It worked, thank you BitJam. The utilisation is small - a dozen percent at most even at 90% of memory usage, but I am assuming this is correct.
Re: [SOLVED] creating swap after the installation
If there is a Swap: line in the "free -m" output then that means swap is enabled.
You can adjust when swap kicks in with the swappiness system parameter. It's value represents the percent of free memory before swap kicks in. If you want to to swap sooner then make that number bigger so it kicks in when there is a greater percentage of free memory (sorry if that doesn't make sense). TL;DR: a bigger number means more and sooner swaping.
You can see the current value with:
You can change the current value to 20 with:
You can change the value for future boots by editing the file /etc/sysctl.d/99-swappiness_mx.conf.
You can adjust when swap kicks in with the swappiness system parameter. It's value represents the percent of free memory before swap kicks in. If you want to to swap sooner then make that number bigger so it kicks in when there is a greater percentage of free memory (sorry if that doesn't make sense). TL;DR: a bigger number means more and sooner swaping.
You can see the current value with:
Code: Select all
sudo sysctl vm.swappiness
Code: Select all
sudo sysctl -w vm.swappiness=20
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: [SOLVED] creating swap after the installation
Makes perfect sense, thank you.
swap is on
Great, I will check the system at 20 and make it permanent if all is fine. Thank you BitJam.
Code: Select all
$ free -m
total used free shared buff/cache available
Mem: 3842 1774 624 226 1443 1609
Swap: 8002 0 8002
Code: Select all
$ sudo sysctl vm.swappiness
[sudo] password for TOTAL:
vm.swappiness = 15
$ sudo sysctl -w vm.swappiness=20
vm.swappiness = 20