Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #60750
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | vallor <vallor@cultnix.org> |
| 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> (permalink) |
| 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) |
| Xref | csiph.com comp.os.linux.advocacy:676530 comp.os.linux.misc:60750 |
Cross-posted to 2 groups.
Show key headers only | View raw
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."
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Find similar
Swapping like gangbusters! Chris Ahlstrom <OFeem1987@teleworm.us> - 2024-11-07 09:28 -0500 Re: Swapping like gangbusters! vallor <vallor@cultnix.org> - 2024-11-07 15:06 +0000
csiph-web