Discussion:
swapctl question
Add Reply
Z Ero
2018-04-15 05:37:58 UTC
Reply
Permalink
Raw Message
amd64, 6.2

I have my swap partition set to priority 9 in fstab.

Why does swapctl report priority 0?

# swapctl
Device 512-blocks Used Avail Capacity Priority
/dev/sd0b 11874624 1266232 10608392 11% 0
# cat /etc/fstab
14d16d0d42a89629.a / ffs rw,softdep 1 1
14d16d0d42a89629.k /home ffs rw,softdep,nodev,nosuid 1 2
14d16d0d42a89629.d /tmp ffs rw,nodev,nosuid 1 2
14d16d0d42a89629.f /usr ffs rw,softdep,nodev 1 2
14d16d0d42a89629.g /usr/X11R6 ffs rw,softdep,nodev 1 2
14d16d0d42a89629.h /usr/local ffs rw,softdep,wxallowed,nodev 1 2
14d16d0d42a89629.b none swap sw,priority=9
14d16d0d42a89629.e /var ffs rw,softdep,nodev,nosuid 1 2

I want to minimize swapping since I am using a mechanical hard disk
and thus swap slows things down.

I can disable swap if I want with swapctl -d but I would rather not.

Thanks
Z Ero
2018-04-15 05:42:10 UTC
Reply
Permalink
Raw Message
Also, why is Firefox 58 taking up about 2 gb of ram when I have 8
(non-multimedia) tabs open?
Post by Z Ero
amd64, 6.2
I have my swap partition set to priority 9 in fstab.
Why does swapctl report priority 0?
# swapctl
Device 512-blocks Used Avail Capacity Priority
/dev/sd0b 11874624 1266232 10608392 11% 0
# cat /etc/fstab
14d16d0d42a89629.a / ffs rw,softdep 1 1
14d16d0d42a89629.k /home ffs rw,softdep,nodev,nosuid 1 2
14d16d0d42a89629.d /tmp ffs rw,nodev,nosuid 1 2
14d16d0d42a89629.f /usr ffs rw,softdep,nodev 1 2
14d16d0d42a89629.g /usr/X11R6 ffs rw,softdep,nodev 1 2
14d16d0d42a89629.h /usr/local ffs rw,softdep,wxallowed,nodev 1 2
14d16d0d42a89629.b none swap sw,priority=9
14d16d0d42a89629.e /var ffs rw,softdep,nodev,nosuid 1 2
I want to minimize swapping since I am using a mechanical hard disk
and thus swap slows things down.
I can disable swap if I want with swapctl -d but I would rather not.
Thanks
Otto Moerbeek
2018-04-15 06:49:34 UTC
Reply
Permalink
Raw Message
Post by Z Ero
Also, why is Firefox 58 taking up about 2 gb of ram when I have 8
(non-multimedia) tabs open?
Isn't confusing toi ask a new qustion with the same Subject.

Show the numbers and how you retrieved them. This is system using
virtual memory, not all numbers report actial physical memory usage.

That said, most web browsers are blaoted beyond believe.

-Otto
Post by Z Ero
Post by Z Ero
amd64, 6.2
I have my swap partition set to priority 9 in fstab.
Why does swapctl report priority 0?
# swapctl
Device 512-blocks Used Avail Capacity Priority
/dev/sd0b 11874624 1266232 10608392 11% 0
# cat /etc/fstab
14d16d0d42a89629.a / ffs rw,softdep 1 1
14d16d0d42a89629.k /home ffs rw,softdep,nodev,nosuid 1 2
14d16d0d42a89629.d /tmp ffs rw,nodev,nosuid 1 2
14d16d0d42a89629.f /usr ffs rw,softdep,nodev 1 2
14d16d0d42a89629.g /usr/X11R6 ffs rw,softdep,nodev 1 2
14d16d0d42a89629.h /usr/local ffs rw,softdep,wxallowed,nodev 1 2
14d16d0d42a89629.b none swap sw,priority=9
14d16d0d42a89629.e /var ffs rw,softdep,nodev,nosuid 1 2
I want to minimize swapping since I am using a mechanical hard disk
and thus swap slows things down.
I can disable swap if I want with swapctl -d but I would rather not.
Thanks
Otto Moerbeek
2018-04-16 05:59:39 UTC
Reply
Permalink
Raw Message
Post by Otto Moerbeek
Post by Z Ero
Also, why is Firefox 58 taking up about 2 gb of ram when I have 8
(non-multimedia) tabs open?
Isn't confusing toi ask a new qustion with the same Subject.
Show the numbers and how you retrieved them. This is system using
virtual memory, not all numbers report actial physical memory usage.
That said, most web browsers are blaoted beyond believe.
Z, It would be good to respond to questions and provide the requested
information before bombarding the list with new questions.

-Otto

Philip Guenther
2018-04-15 06:37:17 UTC
Reply
Permalink
Raw Message
Whoops, meant to send this to the list too:

---------- Forwarded message ----------
From: Philip Guenther <***@gmail.com>
Date: Sat, Apr 14, 2018 at 11:13 PM
Subject: Re: swapctl question
Post by Z Ero
amd64, 6.2
I have my swap partition set to priority 9 in fstab.
Why does swapctl report priority 0?
The compiled in default swap location (normally the 'b' partition of the
boot disk) is added as swap at priority zero in kernel startup as part of
uvm_swap_init(), before any userspace processes are started or /etc/fstab
is read.


# swapctl
Post by Z Ero
Device 512-blocks Used Avail Capacity Priority
/dev/sd0b 11874624 1266232 10608392 11% 0
# cat /etc/fstab
You only have one swap device so the priority doesn't matter: priority is
for selection _among_ swap devices and has no effect on the kernel's
decision of _whether_ to swap out a page.


I want to minimize swapping since I am using a mechanical hard disk
Post by Z Ero
and thus swap slows things down.
Slows things down relative to _what_? Which statistics have you been
examining when under the workload you're interested in?


Philip Guenther
Loading...