All of lore.kernel.org
 help / color / mirror / Atom feed
* About swapaccount=
@ 2023-03-02 19:01 Jonas Schäfer
  2023-03-02 19:12 ` Yosry Ahmed
  0 siblings, 1 reply; 3+ messages in thread
From: Jonas Schäfer @ 2023-03-02 19:01 UTC (permalink / raw)
  To: linux-mm

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

Hi there,

By coincidence, I found this log message in my kernel logs:

Mär 02 17:23:19 sinistra kernel: The swapaccount= commandline option is 
deprecated. Please report your usecase to linux-mm@kvack.org if you depend on 
this functionality.

My usecase does depend on this in the following way:

I use LXC extensively to isolate workloads from one another. Kind of like 
docker, but with full operating systems inside.

Before I found out about swapaccount, I often ran into the issue that one 
misbehaving workload from one of those containers would bring the entire 
machine to a halt because it occupied lots of swap, and thus triggered 
significant slowdown.

With swapaccount, I limit swap to about 10% of the RAM assigned to the 
containers. This allows them to swap out unused stuff, but invokes the OOM 
killer before any significant slowdown happens.

The alternative would be to turn off swap for the system entirely, but it is 
running fairly efficiently thanks to swapping stuff out.

I'd be interested to hear about alternatives.

Thanks for hearing me, anyway.

kind regards,
Jonas Schäfer

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About swapaccount=
  2023-03-02 19:01 About swapaccount= Jonas Schäfer
@ 2023-03-02 19:12 ` Yosry Ahmed
  2023-03-03  9:46   ` Jonas Schäfer
  0 siblings, 1 reply; 3+ messages in thread
From: Yosry Ahmed @ 2023-03-02 19:12 UTC (permalink / raw)
  To: Jonas Schäfer; +Cc: linux-mm

On Thu, Mar 2, 2023 at 11:01 AM Jonas Schäfer <jonas@wielicki.name> wrote:
>
> Hi there,
>
> By coincidence, I found this log message in my kernel logs:
>
> Mär 02 17:23:19 sinistra kernel: The swapaccount= commandline option is
> deprecated. Please report your usecase to linux-mm@kvack.org if you depend on
> this functionality.
>
> My usecase does depend on this in the following way:
>
> I use LXC extensively to isolate workloads from one another. Kind of like
> docker, but with full operating systems inside.
>
> Before I found out about swapaccount, I often ran into the issue that one
> misbehaving workload from one of those containers would bring the entire
> machine to a halt because it occupied lots of swap, and thus triggered
> significant slowdown.
>
> With swapaccount, I limit swap to about 10% of the RAM assigned to the
> containers. This allows them to swap out unused stuff, but invokes the OOM
> killer before any significant slowdown happens.
>
> The alternative would be to turn off swap for the system entirely, but it is
> running fairly efficiently thanks to swapping stuff out.
>
> I'd be interested to hear about alternatives.
>
> Thanks for hearing me, anyway.

If I understand correctly you were setting swapaccount=1, right?

IIRC, swapaccount= was deprecated in the sense that it is always on
now (i.e you cannot set swapaccount=0).

>
> kind regards,
> Jonas Schäfer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About swapaccount=
  2023-03-02 19:12 ` Yosry Ahmed
@ 2023-03-03  9:46   ` Jonas Schäfer
  0 siblings, 0 replies; 3+ messages in thread
From: Jonas Schäfer @ 2023-03-03  9:46 UTC (permalink / raw)
  To: Yosry Ahmed; +Cc: linux-mm

Hi Yosry,

On Donnerstag, 2. März 2023 20:12:43 CET Yosry Ahmed wrote:
> On Thu, Mar 2, 2023 at 11:01 AM Jonas Schäfer <jonas@wielicki.name> wrote:
> > Hi there,
> > 
> > By coincidence, I found this log message in my kernel logs:
> > 
> > Mär 02 17:23:19 sinistra kernel: The swapaccount= commandline option is
> > deprecated. Please report your usecase to linux-mm@kvack.org if you depend
> > on this functionality.
> > 
> > My usecase does depend on this in the following way:
> > 
> > I use LXC extensively to isolate workloads from one another. Kind of like
> > docker, but with full operating systems inside.
> > 
> > Before I found out about swapaccount, I often ran into the issue that one
> > misbehaving workload from one of those containers would bring the entire
> > machine to a halt because it occupied lots of swap, and thus triggered
> > significant slowdown.
> > 
> > With swapaccount, I limit swap to about 10% of the RAM assigned to the
> > containers. This allows them to swap out unused stuff, but invokes the OOM
> > killer before any significant slowdown happens.
> > 
> > The alternative would be to turn off swap for the system entirely, but it
> > is running fairly efficiently thanks to swapping stuff out.
> > 
> > I'd be interested to hear about alternatives.
> > 
> > Thanks for hearing me, anyway.
> 
> If I understand correctly you were setting swapaccount=1, right?
> 
> IIRC, swapaccount= was deprecated in the sense that it is always on
> now (i.e you cannot set swapaccount=0).

Thank you for the swift reply. Indeed, I am using swapaccount=1, so I assumed 
the deprecation warning was related to =1. If =1 continues to work as default, 
that just means I have one less thing to carry around in the grub config and 
is not a problem at all!

Thanks!

kind regards,
Jonas




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-03  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 19:01 About swapaccount= Jonas Schäfer
2023-03-02 19:12 ` Yosry Ahmed
2023-03-03  9:46   ` Jonas Schäfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.