Groups | Search | Server Info | Login | Register


Groups > comp.sys.raspberry-pi > #37850

Re: Adding a hardware swap partition

From bp@www.zefox.net
Newsgroups comp.sys.raspberry-pi
Subject Re: Adding a hardware swap partition
Date 2026-03-15 22:53 +0000
Organization A noiseless patient Spider
Message-ID <10p7d94$1giuh$1@dont-email.me> (permalink)
References <10os4nv$17t1j$1@dont-email.me> <slrn10r8ivq.4hq.zsd@x360.localdomain> <10p6c09$146u2$1@druck.eternal-september.org> <10p6e63$151t6$1@dont-email.me> <slrn10re7ma.3r3.zsd@x360.localdomain>

Show all headers | View raw


Jim Diamond <zsd@jdvb.ca> wrote:
> 
> Yes, but that has nothing much to do with the OP's plan to put /usr on its
> own partition.  He didn't indicate where /home was going, but if he puts it
> on the root partition, he can still fill that up.  And if /var is on /root,
> also problems.
> 
> Which is why I was curious about why he wants to a separate /usr partition.

Since you ask...8-)

On rare occasions my 8GB Pi5 slowed to a crawl. Eventually I realized it was
happening when I had two browsers (firefox and chromium) both running with
too many tabs open. The system was short of memory. It needed swap to cope
this those occasions.

Hardware swap is _supposed_ to be faster than a swap partition, which made it,
at least in principle, more attractive. Also, in principle, a physical swap
partition can be placed _between_ (in the sense of seek stroke) /uar and /,
minimizing the amount of head movevent. This was true in the days of st506
disks, I'm not sure how true it is with SATA. So, I inquired about how this
might be done under RasPiOS. It's not hurgely hard under FreeBSD and
I thought there might be some nifty tools for the purpose in RasPiOS.

The answers received have now led me to question the orignal premises.
No nifty tools have come to light. The relative speed of file-vs-hardware
swap haven't been quantified. The need for occasional swap use remains, but
it's sporadic. Maybe a swapfile is good enough.... it's certainly easier.

It was a surprise to learn that a single partition is somehow required
for RasPiOS to function correctly. If true, it's a good thing to know.
 
> Back in the good old days there were enough programs in /bin (which was an
> actual directory, not a link to /usr/bin) to recover a system with disk
> errors (when possible, anyway).  But now that /bin is a link, I wonder if
> the system will even boot properly, since "user space" would have to mount
> /usr before almost all (all?) programs are available.  Including systemd.

Given that RasPiOS has an /sbin directory, I'm pretty sure the machine
will come up at worst in single-user if /usr can't be mounted normally.
Whether /home/, /var/ and  /tmp/  can be links to /usr is less clear to 
me at this point. 

The original plan would have left the machine with a /root of around
100GB and a /usr of around 800GB so running out of space isn't a problem. 

> OP, where are you... ?

Busy trying to drink from a firehose 8-) And, thanks to those at the pumps!

bob prohaska

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Adding a hardware swap partition bp@www.zefox.net - 2026-03-11 16:20 +0000
  Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-11 16:43 +0000
  Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-11 21:39 +0000
    Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-12 15:37 +0000
      Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-12 20:59 +0000
        Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-13 01:26 +0000
          Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-13 11:15 +0000
            Re: Adding a hardware swap partition Theo <theom+news@chiark.greenend.org.uk> - 2026-03-13 14:16 +0000
              Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-13 16:01 +0000
                Re: Adding a hardware swap partition Theo <theom+news@chiark.greenend.org.uk> - 2026-03-13 18:28 +0000
                Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-13 21:50 +0000
              Re: Adding a hardware swap partition druck <news@druck.org.uk> - 2026-03-13 21:26 +0000
          Re: Adding a hardware swap partition Kees Nuyt <kees@nospam.demon.invalid> - 2026-03-13 22:25 +0100
  Re: Adding a hardware swap partition Jim Jackson <jj@franjam.org.uk> - 2026-03-12 09:13 +0000
    Re: Adding a hardware swap partition Jim Jackson <jj@franjam.org.uk> - 2026-03-12 09:31 +0000
  Re: Adding a hardware swap partition Jim Jackson <jj@franjam.org.uk> - 2026-03-12 10:07 +0000
  Re: Adding a hardware swap partition Jim Diamond <zsd@jdvb.ca> - 2026-03-13 14:40 -0300
    Re: Adding a hardware swap partition druck <news@druck.org.uk> - 2026-03-15 13:25 +0000
      Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-15 14:02 +0000
        Re: Adding a hardware swap partition Josef Möllers <josef@invalid.invalid> - 2026-03-15 17:02 +0100
        Re: Adding a hardware swap partition Jim Diamond <zsd@jdvb.ca> - 2026-03-15 18:04 -0300
          Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-15 21:31 +0000
            Re: Adding a hardware swap partition Theo <theom+news@chiark.greenend.org.uk> - 2026-03-16 16:01 +0000
              Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-16 22:53 +0000
          Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-15 22:53 +0000
            Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-16 01:41 +0000
            Re: Adding a hardware swap partition Richard Kettlewell <invalid@invalid.invalid> - 2026-03-16 09:54 +0000
              Re: Adding a hardware swap partition Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-16 11:49 +0000
                Re: Adding a hardware swap partition Richard Kettlewell <invalid@invalid.invalid> - 2026-03-16 12:18 +0000
            Re: Adding a hardware swap partition Jim Diamond <zsd@jdvb.ca> - 2026-03-17 18:30 -0300
              Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-19 01:36 +0000
                Re: Adding a hardware swap partition Richard Kettlewell <invalid@invalid.invalid> - 2026-03-19 08:52 +0000
                Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-19 14:49 +0000
                Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-19 19:23 +0000
                Re: Adding a hardware swap partition Richard Kettlewell <invalid@invalid.invalid> - 2026-03-19 22:01 +0000
                Re: Adding a hardware swap partition Richard Kettlewell <invalid@invalid.invalid> - 2026-03-19 22:00 +0000
                Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-20 03:50 +0000
                Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-20 07:02 +0000
                Re: Adding a hardware swap partition Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-19 22:56 +0000
                Re: Adding a hardware swap partition Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2026-03-25 14:53 +0200
                Re: Adding a hardware swap partition bp@www.zefox.net - 2026-03-25 18:53 +0000
          Re: Adding a hardware swap partition The Natural Philosopher <tnp@invalid.invalid> - 2026-03-16 12:38 +0000

csiph-web