swapctl question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

swapctl question

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

Reply | Threaded
Open this post in threaded view
|

Re: swapctl question

Z Ero
Also, why is Firefox 58 taking up about 2 gb of ram when I have 8
(non-multimedia) tabs open?

On Sun, Apr 15, 2018 at 12:37 AM, Z Ero <[hidden email]> wrote:

> 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

Reply | Threaded
Open this post in threaded view
|

Fwd: swapctl question

Philip Guenther-2
In reply to this post by Z Ero
Whoops, meant to send this to the list too:

---------- Forwarded message ----------
From: Philip Guenther <[hidden email]>
Date: Sat, Apr 14, 2018 at 11:13 PM
Subject: Re: swapctl question
To: Z Ero <[hidden email]>


On Sat, Apr 14, 2018 at 10:37 PM, Z Ero <[hidden email]> wrote:

> 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
> 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
> 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
Reply | Threaded
Open this post in threaded view
|

firefor memory usage (Was Re: swapctl question)

Otto Moerbeek
In reply to this post by Z Ero
On Sun, Apr 15, 2018 at 12:42:10AM -0500, Z Ero wrote:

> 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

>
> On Sun, Apr 15, 2018 at 12:37 AM, Z Ero <[hidden email]> wrote:
> > 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

Reply | Threaded
Open this post in threaded view
|

Re: firefor memory usage (Was Re: swapctl question)

Otto Moerbeek
On Sun, Apr 15, 2018 at 08:49:34AM +0200, Otto Moerbeek wrote:

> On Sun, Apr 15, 2018 at 12:42:10AM -0500, Z Ero wrote:
>
> > 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