[ale] to lvm or not lvm is my dillema
Jim Kinney
jim.kinney at gmail.com
Sun Jan 4 10:40:09 EST 2026
On large scale systems, when swap is used at all, it's for parking a
library that's used once then just held in ram forever and not touched.
Fair amount of startup stuff hit this but newer systemd seems more tuned to
use and release by termination. But there's still some glibc bits that
eventually get parked. So running swap down to tiny is usually good. For a
diskless compute node, set swap to off since it's all just ram anyway.
If a web or mail server is eating swap, that's a problem. Cgroup tuning to
set limits on processes might help. Sounds crazy to run the systems only
web service in a container but the ability to set hard resource limits is
pretty useful.
<BOFH>Running all processes of an irritating user in swap is a great way to
lower that user's expectations of system performance. This is recommended
SOP for all new users to avoid later trouble tickets.</BOFH>
--
James P. Kinney III
Every time you stop a school, you will have to build a jail. What you gain
at one end you lose at the other. It's like feeding a dog on his own tail.
It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
*http://heretothereideas.blogspot.com/
<http://heretothereideas.blogspot.com/>*
On Sun, Jan 4, 2026, 10:21 AM Jeff Lightner via Ale <ale at ale.org> wrote:
> Although "swap" became a misnomer once systems moved from "swapping" to
> "paging" setting up swap spaces is still an important factor on high memory
> systems. While it is true swap size no longer has to match physical
> memory
> size (at least on Linux) it is also true that swap should be examined and
> possibly adjusted as one adds physical memory.
>
> Of course newer tuning settings such as "swapiness" are also important to
> examine and set.
>
> Also, creating multiple equal size swap "devices" (LVs or partitions) is
> important as "paging" is done in a round robin fashion if tuned properly.
>
>
> -----Original Message-----
> From: Ale <ale-bounces at ale.org> On Behalf Of DJPfulio--- via Ale
> Sent: Sunday, January 4, 2026 10:12 AM
> To: ale at ale.org
> Cc: DJPfulio at jdpfu.com
> Subject: Re: [ale] to lvm or not lvm is my dillema
>
> On 1/3/26 19:13, Steve Litt via Ale wrote:
> >> No. If you increase physical RAM you often want to add SWAP
> >> devices.
>
> I disagree.
>
> Since around 2000, the old rules of 2-3x RAM for swap just don't apply if
> you want a responsive server.
> In the days of more than 4GB of RAM, swap use has drastically changed
>
> a) from "provide virtual memory"
> b) to "let the admin know when slowdowns are happening so steps can be
> taken".
>
> I try to run my servers without needing any swap, though the kernel setup
> prefers _some_ swap to enable performance features. For the last 2+
> decades, I've never added more than 4GB swap to any system, including
> desktops. Only desktops that are hibernated could need more. For a long
> time, I ran servers with ZERO swap. I'd just size the RAM for the VM to be
> sufficient for the workload. This worked for almost a decade, but was
> probably a mistake. I don't recall when, but the kernel guys enable certain
> performance toggles only if there's some swap, so 500M is what I started
> adding to servers that really don't need any, but the kernel switches
> require. I still try to ensure workloads fit within the RAM only and turn
> down swappiness to minimal levels in the tuning.
>
> I'm assuming people can buy more RAM as needed for the workload. That's
> been my experience regardless of workload for multiple decades - both for
> servers and desktops. Laptops aren't desktops. They have a bunch of other
> issues, often which cannot be solved.
>
> Has swap changed again and I missed it? That's entirely possible.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20260104/0b0f55f2/attachment.htm>
More information about the Ale
mailing list