Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You're working under a slight handicap. You happen to be human.


comp / comp.os.linux.advocacy / Swapping like gangbusters!

SubjectAuthor
* Swapping like gangbusters!Chris Ahlstrom
`- Re: Swapping like gangbusters!vallor

1
Subject: Swapping like gangbusters!
From: Chris Ahlstrom
Newsgroups: comp.os.linux.advocacy, comp.os.linux.misc
Organization: None
Date: Thu, 7 Nov 2024 14:28 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy,comp.os.linux.misc
Subject: Swapping like gangbusters!
Date: Thu, 7 Nov 2024 09:28:10 -0500
Organization: None
Lines: 28
Message-ID: <vgiips$2mgad$2@dont-email.me>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Thu, 07 Nov 2024 15:28:12 +0100 (CET)
Injection-Info: dont-email.me; posting-host="1e3267bb1c33375983338e29a640fe76";
logging-data="2834765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RyfwiA0x4nlotNNy6HvfZ"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:mRzaifZne+W25WV++dl2YE2qvfM=
X-Face: 63n<76,LYJQ2m#'5YL#.T95xqyPiG`ffIP70tN+j"(&@6(4l\7uL)2+/-r0)/9SjZ`qw=
Njn mr93Xrerx}aQG-Ap5IHn"xe;`5:pp"$RH>Kx_ngWw%c\+6qSg!q"41n2[.N/;Pu6q8?+Poz~e
A9? $6_R7cm.l!s8]yfv7x+-FYQ|/k
View all headers

So occasionally kswapd will start going whole hog. In combination with Chromium
running and a make -j N job running, the system would slow wayyyyyy down,
with kswapd trying to find a swap partition that did not exist (my bad!).

There's a daemon called swapspace in the Debian repository. But I decided to
try making a swapfile first. Here are the steps ("#" indicates a root prompt or
the use of sudo):

# fallocate -l 4G /swapfile [or see the "dd" command below]
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile
# vi /etc/fstab, and add:

/swapfile swap swap defaults 0 0 [to make the change permanent at boot]

# swapon --show [to verify]

Alternate command:

# dd if=/dev/zero of=/swapfile bs=1024 count=4194304

Imma go with this for awhile and see how it goes. If you try it, don't blame me
if it fscks up your system :-D

--
The most important early product on the way to developing a good product
is an imperfect version.

Subject: Re: Swapping like gangbusters!
From: vallor
Newsgroups: comp.os.linux.advocacy, comp.os.linux.misc
Date: Thu, 7 Nov 2024 15:06 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: vallor@cultnix.org (vallor)
Newsgroups: comp.os.linux.advocacy,comp.os.linux.misc
Subject: Re: Swapping like gangbusters!
Date: 7 Nov 2024 15:06:28 GMT
Lines: 38
Message-ID: <lp43bkF6snjU1@mid.individual.net>
References: <vgiips$2mgad$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net rfEu4u7l8kH/PhgbKHBZfQiOwOwFRIYK99+wZANJDlFRLIMVCQ
Cancel-Lock: sha1:HFWw24qSK5b7S50egyxbi3hDvKU= sha256:qKZha4Jfm0F7sl6umrVmW4cWZ7IDFE2r0j5BPDNYXsQ=
X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl
CaKku`)]}.V/"6rISCIDP`
User-Agent: Pan/0.161 (Hmm2; 700d2d95; Linux-6.11.6)
View all headers

On Thu, 7 Nov 2024 09:28:10 -0500, Chris Ahlstrom <OFeem1987@teleworm.us>
wrote in <vgiips$2mgad$2@dont-email.me>:

> So occasionally kswapd will start going whole hog. In combination with
> Chromium running and a make -j N job running, the system would slow
> wayyyyyy down,
> with kswapd trying to find a swap partition that did not exist (my
> bad!).
>
> There's a daemon called swapspace in the Debian repository. But I
> decided to try making a swapfile first. Here are the steps ("#"
> indicates a root prompt or the use of sudo):
>
> # fallocate -l 4G /swapfile [or see the "dd" command below]
> # chmod 600 /swapfile # mkswap /swapfile # swapon /swapfile # vi
> /etc/fstab, and add:
>
> /swapfile swap swap defaults 0 0 [to make the change permanent at
> boot]
>
> # swapon --show [to verify]
>
> Alternate command:
>
> # dd if=/dev/zero of=/swapfile bs=1024 count=4194304
>
> Imma go with this for awhile and see how it goes. If you try it, don't
> blame me if it fscks up your system :-D

Thanks for the heads-up about fallocate(1).

If creating a large file for (say) a virtual host, you might want
to consider truncate(1), which builds a sparse file.

--
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
OS: Linux 6.11.6 Release: Mint 21.3 Mem: 258G
"If you don't like the news, go out and make some of your own."

1

rocksolid light 0.9.8
clearnet tor