Mint 23 is coming and I normally wipe and reload from scratch. It's served me well or
that past 10 versions.
So one thing I'm thinking of changing is my swap. I have 32G of memory and normally I've
been using a 27G swap space. But I'm thinking of just not doing swap any more.
Ideas?
So one thing I'm thinking of changing is my swap. I have 32G of
memory and normally I've been using a 27G swap space. But I'm
thinking of just not doing swap any more.
Ideas?
Mint 23 is coming and I normally wipe and reload from scratch.˙ It's
served me well or that past 10 versions.
So one thing I'm thinking of changing is my swap.˙ I have 32G of memory
and normally I've been using a 27G swap space.˙˙ But I'm thinking of
just not doing swap any more.
Ideas?
Mint 23 is coming and I normally wipe and reload from scratch.˙ It's served me well or that past 10 versions.
So one thing I'm thinking of changing is my swap.˙ I have 32G of memory and normally I've been using a 27G swap space.˙˙ But I'm thinking of just not doing swap any more.
Ideas?
I leave the swap at the 1GB level.
If the distro had any tendency for short swap usage
transients, that helps avoid an OOM killer incident,
which usually takes out the desktop, rather
than just killing a greedy application.
At one time, the people running distros, didn't know
how to tune the virtual memory system. The OS may have
been set to drop to as low as 50KB of remaining virtual
memory in a free pool, before the garbage collector
would go about collecting memory and refilling the pool.
This could cause a "short transient" onto swap, where a
small number of bytes might be required of swap, simply because
a portion of the automation "was not ready in time".
Later, I got the impression some setups changed to having
the garbage collector triggered at about 50% free, rather
than waiting until the free pool was dangerously low
and "putting on a big show for the folks" of refilling it.
This did not mean the system was even remotely close to being
out of memory, just the accounting system was not tuned
and one part of the system could have resources that another
part could not use ("immediately").
This would leave your swap choices at three possible levels,
depending on your "belief" as to how your distro worked.
[32GB physical RAM system]
0 GB swap - if you believe the transient behavior is properly tuned on your distro
- Watching "top" is how I used to check for the dangerous tuning option.
- If swap stays at 0 out of 27GB for days on end, maybe turning it down is OK.
1 GB swap - This amount is for transients, and it doesn't need all of that,
but if we don't understand the pathology well enough, this might be safe
33GB swap - Maybe we could record a kernel panic as a full dump, with this choice.
Perhaps there is a command in a kernel debugger, to give a stack trace
based on analysis of a full dump. I don't know if I've seen a kernel panic
on a fully loaded system recently. I've probably seen a panic early in boot when
something is fouled up enough to do it. Ah, maybe it was me, experimenting
on a too-small system (not enough RAM to really be running it). My laptop
for example, only has 3GB, which is not a good choice for an amount.
Some of my older computers are less fortunate, at 2GB, 1.5GB, 704MB.
Two of my computers died, taking out some other memory amounts for test
purposes (P4C800 and a 2.8GHz dual core, the P5E with E8400 in it).
Paul
If the distro had any tendency for short swap usage transients, that
helps avoid an OOM killer incident, which usually takes out the
desktop, rather than just killing a greedy application.
On Thu, 5/28/2026 4:51 PM, Alan K. wrote:
Mint 23 is coming and I normally wipe and reload from scratch.˙ It's served me well or that past 10 versions.
So one thing I'm thinking of changing is my swap.˙ I have 32G of memory and normally I've been using a 27G swap space.˙˙ But I'm thinking of just not doing swap any more.
Ideas?
I leave the swap at the 1GB level.
If the distro had any tendency for short swap usage
transients, that helps avoid an OOM killer incident,
which usually takes out the desktop, rather
than just killing a greedy application.
At one time, the people running distros, didn't know
how to tune the virtual memory system. The OS may have
been set to drop to as low as 50KB of remaining virtual
memory in a free pool, before the garbage collector
would go about collecting memory and refilling the pool.
This could cause a "short transient" onto swap, where a
small number of bytes might be required of swap, simply because
a portion of the automation "was not ready in time".
Later, I got the impression some setups changed to having
the garbage collector triggered at about 50% free, rather
than waiting until the free pool was dangerously low
and "putting on a big show for the folks" of refilling it.
This did not mean the system was even remotely close to being
out of memory, just the accounting system was not tuned
and one part of the system could have resources that another
part could not use ("immediately").
This would leave your swap choices at three possible levels,
depending on your "belief" as to how your distro worked.
[32GB physical RAM system]
0 GB swap - if you believe the transient behavior is properly tuned on your distro
- Watching "top" is how I used to check for the dangerous tuning option.
- If swap stays at 0 out of 27GB for days on end, maybe turning it down is OK.
1 GB swap - This amount is for transients, and it doesn't need all of that,
but if we don't understand the pathology well enough, this might be safe
33GB swap - Maybe we could record a kernel panic as a full dump, with this choice.
Perhaps there is a command in a kernel debugger, to give a stack trace
based on analysis of a full dump. I don't know if I've seen a kernel panic
on a fully loaded system recently. I've probably seen a panic early in boot when
something is fouled up enough to do it. Ah, maybe it was me, experimenting
on a too-small system (not enough RAM to really be running it). My laptop
for example, only has 3GB, which is not a good choice for an amount.
Some of my older computers are less fortunate, at 2GB, 1.5GB, 704MB.
Two of my computers died, taking out some other memory amounts for test
purposes (P4C800 and a 2.8GHz dual core, the P5E with E8400 in it).
Paul
I'm leaning towards just dropping it from 28G down to 5G.˙
That gives me 23 more gigs to put someplace else.˙˙ Now I
just have to see how I can shuffle things around without too much disruption.
On Fri, 5/29/2026 11:46 AM, Alan K. wrote:
I'm leaning towards just dropping it from 28G down to 5G.
That gives me 23 more gigs to put someplace else.˙˙ Now I
just have to see how I can shuffle things around without too much disruption.
gparted can do some partition management for you.
There should not be much "structure" to a swap, as it likely
has a sector set aside with some metadata in it, the rest
of it should be more-or-less raw storage, as the activity
there isn't a filesystem as such.
For GParted to shrink it, would mean re-writing the metadata
in the header (slightly), and changing the envelope-size of the partition. Something like that at a guess.
The main thing is not changing the BLKID. In your /etc/fstab (text file) should be some details about your swap and how it mounts. You even get
to discover at that point, whether it is a partition or a /swapfile .
*******
Since one common pagesize is 4KB, it makes sense from an alignment point
of view, that the header would be 4KB, and then an integral number of
4KB pages would remain. The header is relatively empty. Lots of zeros in there. And only 16 bytes of "numbers" of some sort.
https://unix.stackexchange.com/questions/226196/how-does-mkswap-work-what-is-in-the-swap-header-it-creates
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000400 01 00 00 00 09 00 00 00 00 00 00 00 22 e8 83 6e |............"..n|
00000410 88 06 4a 0b 83 bc 12 44 8e 3e a3 e0 00 00 00 00 |..J....D.>......|
00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000ff0 00 00 00 00 00 00 53 57 41 50 53 50 41 43 45 32 |......SWAPSPACE2|
00001000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
The GPT partition table, has "two numbers" per partition entry
in a 64KB or so table at beginning and end of disk. One is
a partition type (which can be "fairly general" like something
declared as a Linux Basic Data Partition relies on the filesystem
header to identify exactly what is inside that envelope). On an MSDOS partitioned disk, there is a code point set aside for swap as a
partition type (0x82) versus 0x83 for EXTn.
https://en.wikipedia.org/wiki/Partition_type
None of this is particularly important EXCEPT screwing up the swap so
that it no longer aligns with what /etc/fstab says. If you do screw it
up, your boot process can end up a bit slower as the OS goes through
a "charade" of pretending to search for an available swap, checking
under sofa cushions and so on. It will pretend it is scanning some
BTRFS partition, it checks for RAID arrays and other silly stuff.
And that takes extra time. And as a user, the first time I looked
in "dmesg" and saw that bullshit, I was "quite curious as to what
was going on in there" :-) And it took me a while to figure out
"oh, shit, I broke my swap". I never associated all the strange activities
as a "search for Waldo".
Paul
On 5/29/26 1:34 PM, Paul wrote:
On Fri, 5/29/2026 11:46 AM, Alan K. wrote:Well the good part is if I reload Mint 23 I'll make it larger and swap smaller and let the installer do what it wants, as I'll just point it to
I'm leaning towards just dropping it from 28G down to 5G.
That gives me 23 more gigs to put someplace else.˙˙ Now I
just have to see how I can shuffle things around without too much
disruption.
gparted can do some partition management for you.
There should not be much "structure" to a swap, as it likely
has a sector set aside with some metadata in it, the rest
of it should be more-or-less raw storage, as the activity
there isn't a filesystem as such.
For GParted to shrink it, would mean re-writing the metadata
in the header (slightly), and changing the envelope-size of the
partition.
Something like that at a guess.
The main thing is not changing the BLKID. In your /etc/fstab (text file)
should be some details about your swap and how it mounts. You even get
to discover at that point, whether it is a partition or a /swapfile .
*******
Since one common pagesize is 4KB, it makes sense from an alignment point
of view, that the header would be 4KB, and then an integral number of
4KB pages would remain. The header is relatively empty. Lots of zeros in
there. And only 16 bytes of "numbers" of some sort.
https://unix.stackexchange.com/questions/226196/how-does-mkswap-work-
what-is-in-the-swap-header-it-creates
00000000˙ 00 00 00 00 00 00 00 00˙ 00 00 00 00 00 00 00 00
|................|
*
00000400˙ 01 00 00 00 09 00 00 00˙ 00 00 00 00 22 e8 83 6e
|............"..n|
00000410˙ 88 06 4a 0b 83 bc 12 44˙ 8e 3e a3 e0 00 00 00 00
|..J....D.>......|
00000420˙ 00 00 00 00 00 00 00 00˙ 00 00 00 00 00 00 00 00
|................|
*
00000ff0˙ 00 00 00 00 00 00 53 57˙ 41 50 53 50 41 43 45 32
|......SWAPSPACE2|
00001000˙ 00 00 00 00 00 00 00 00˙ 00 00 00 00 00 00 00 00
|................|
The GPT partition table, has "two numbers" per partition entry
in a 64KB or so table at beginning and end of disk. One is
a partition type (which can be "fairly general" like something
declared as a Linux Basic Data Partition relies on the filesystem
header to identify exactly what is inside that envelope). On an MSDOS
partitioned disk, there is a code point set aside for swap as a
partition type (0x82) versus 0x83 for EXTn.
˙˙˙ https://en.wikipedia.org/wiki/Partition_type
None of this is particularly important EXCEPT screwing up the swap so
that it no longer aligns with what /etc/fstab says. If you do screw it
up, your boot process can end up a bit slower as the OS goes through
a "charade" of pretending to search for an available swap, checking
under sofa cushions and so on. It will pretend it is scanning some
BTRFS partition, it checks for RAID arrays and other silly stuff.
And that takes extra time. And as a user, the first time I looked
in "dmesg" and saw that bullshit, I was "quite curious as to what
was going on in there" :-) And it took me a while to figure out
"oh, shit, I broke my swap". I never associated all the strange
activities
as a "search for Waldo".
˙˙˙ Paul
the free space and let is go. ?
On Sat, 30 May 2026 07:47:23 +0200, german newsgroups ><usualsuspectrider@gmail.com> wrote:
Le 29/05/2026 … 22:33, Alan K. a ‚crit˙:
so ! what we can to say...
we need a swap or not ? if it's yes, when we need it ?
may be, if the drive is a nvme...it's so cool ! may be a swap
with a ssd sata is enought !!!
so how to control the swap is working ?
On 5/29/26 1:34 PM, Paul wrote:[...trimmed...]
On Fri, 5/29/2026 11:46 AM, Alan K. wrote:
I'm leaning towards just dropping it from 28G down to 5G.
That gives me 23 more gigs to put someplace else.˙˙ Now I
just have to see how I can shuffle things around without too much
disruption.
gparted can do some partition management for you.
There should not be much "structure" to a swap, as it likely
has a sector set aside with some metadata in it, the rest
of it should be more-or-less raw storage, as the activity
there isn't a filesystem as such.
For GParted to shrink it, would mean re-writing the metadata
in the header (slightly), and changing the envelope-size of the
partition.
Something like that at a guess.
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 4 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 495146:50:23 |
| Calls: | 165 |
| Files: | 574 |
| D/L today: |
29 files (9,998K bytes) |
| Messages: | 78,216 |