• Swap partition?

    From Vincent Coen@2:250/1 to All on Fri Apr 8 19:23:18 2022
    Hello All!

    I have noticed that for the Pi on both a 3B+ and a 4B 8GB Ram both using a HDD and SSD respectively there is no swap partition set up.

    Every other Linux system I have does even if the Ram is 16 GB so two questions:
    Is there a good reason why it does not get set up ?
    What is the best way to set one up.

    While the 8Gb may not get over committed the 3 easily can and I want to runs some real applications on both (uses a terminal app built with Cobol and C) as well as a bbs system..

    This will act as a special service to maintain Echo areas for various network and issue at the start of month various reports and files and these are sent out.

    With this lot running, it might well need to swap out ram to HDD during processing.

    Needles to say, I will be checking this 'assumption' to verify one way or another but I do not like to not have a swap space declared even if it is only 2 - 4 Gb.

    Vincent

    --- Mageia Linux v8 X64/Mbse v1.0.8/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Shaun Buzza@1:229/110 to Vincent Coen on Fri Apr 8 15:05:10 2022
    I have noticed that for the Pi on both a 3B+ and a 4B 8GB Ram both using
    a HDD and SSD respectively there is no swap partition set up.

    Huh. I hadn't even noticed. Just checked my own 3B+, and sure enough, no swap...With what I do with it, it doesn't need a swap. But, as you described later on, you plan to do something very different.

    Every other Linux system I have does even if the Ram is 16 GB so two questions:
    Is there a good reason why it does not get set up ?
    What is the best way to set one up.

    My first guess would be that this is done to prevent the early death of the SD card. After all, not that long ago, the SD card was the only place one could install PiOS. And SD cards wear out quite a bit faster than a HDD or SSD.

    I'm not sure if it's the best way, but *my* way would be to install gparted (or equivalent), resize the main partition, and build a swap partition. Reboot, 'swapon', and Bob's yer uncle.

    For best performance, I would also ensure the swap partition was at the *front* on a HDD; for a SSD (or SD card), it wouldn't matter.

    McDoob
    SysOp, PiBBS
    pibbs.sytes.net

    ... What does it mean to pre-board? Do you get on before you get on?

    --- Mystic BBS v1.12 A47 2021/12/24 (Raspberry Pi/32)
    * Origin: PiBBS (1:229/110)
  • From Vincent Coen@2:250/1 to Shaun Buzza on Fri Apr 8 22:08:56 2022
    Hello Shaun!

    Friday April 08 2022 15:05, you wrote to me:

    I have noticed that for the Pi on both a 3B+ and a 4B 8GB Ram
    both using a HDD and SSD respectively there is no swap partition
    set up.

    Huh. I hadn't even noticed. Just checked my own 3B+, and sure enough,
    no swap...With what I do with it, it doesn't need a swap. But, as you described later on, you plan to do something very different.

    Every other Linux system I have does even if the Ram is 16 GB so
    two questions: Is there a good reason why it does not get set up
    ? What is the best way to set one up.

    My first guess would be that this is done to prevent the early death
    of the SD card. After all, not that long ago, the SD card was the only
    place one could install PiOS. And SD cards wear out quite a bit faster
    than a HDD or SSD.

    I'm not sure if it's the best way, but *my* way would be to install
    gparted (or equivalent), resize the main partition, and build a swap partition. Reboot, 'swapon', and Bob's yer uncle.

    For best performance, I would also ensure the swap partition was at
    the *front* on a HDD; for a SSD (or SD card), it wouldn't matter.

    Yes that is the way to go - it is just why on earth that do not provide it.

    I must admit it is a first and only instance of this - I have NEVER seen this else where and that includes many, many installs even for *nix's including Cromix going back to the late 70's and early 80's.

    Suppose that's what happens when non professions build distro's without reading
    the manuals.


    Vincent

    --- Mageia Linux v8 X64/Mbse v1.0.8/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Vincent Coen@2:250/1 to Ahem A Rivet's Shot on Fri Apr 8 22:12:48 2022
    Hello Ahem!

    Friday April 08 2022 20:50, you wrote to Shaun Buzza:

    On Fri, 08 Apr 2022 15:05:11 +1200 nospam.Shaun.Buzza@f110.n229.z1.fidonet.org (Shaun Buzza) wrote:

    For best performance, I would also ensure the swap partition was at
    the *front* on a HDD; for a SSD (or SD card), it wouldn't matter.

    Why ? Putting it dead centre of the tracks would seem to minimise average seek time to the swap area.

    For a mainframe easy but for a micro using any O/S almost impossible - they is not the control to do so with out being VERY specific what cylinders / sectors to use and that means knowing exacting the size of the drive and the use of a calculator :)

    This does not apply to a SSD as Seek, Acces and transfer times are the same from the beginning to the end of the SSD.

    Vincent

    --- Mageia Linux v8 X64/Mbse v1.0.8/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Charlie Gibbs@3:770/3 to Ahem A Rivet's Shot on Sat Apr 9 18:07:56 2022
    On 2022-04-09, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On Fri, 08 Apr 2022 18:12:56 +1200 nospam.Shaun.Buzza@f110.n229.z1.fidonet.org (Shaun Buzza) wrote:

    Since you brought it up: in the 70s and 80s (and even into the very early
    90s), 1 MB of RAM was unimaginable,

    The original workstation recipe was 1 MIP, 1 megabyte and 1
    megapixel - it's grossly inadequate these days in MIPs and megabytes
    although its rare to see the megapixel exceeded by even one order of magnitude (although they tend to be 32 bit pixels now).

    I heard such machines referred to as "3M". This was presumably a
    play on the name of the Minnesota Mining and Manufacturing Company,
    the creators of Scotch Tape [tm]. (Their name was much better known
    in those days.)

    --
    /~\ Charlie Gibbs | Microsoft is a dictatorship.
    \ / <cgibbs@kltpzyxm.invalid> | Apple is a cult.
    X I'm really at ac.dekanfrus | Linux is anarchy.
    / \ if you read it the right way. | Pick your poison.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Martin Gregorie on Sun Apr 10 14:07:56 2022
    On Sun, 10 Apr 2022 12:30:55 -0000 (UTC)
    Martin Gregorie <martin@mydomain.invalid> wrote:

    On Sun, 10 Apr 2022 10:10:34 +0100, Ahem A Rivet's Shot wrote:


    I wasn't trying to suggest that Sellotape was better, it's just
    as universal as Cadbury's chocolate here and about as far from being the best.

    IIRC Cadbury's used to be pretty good chocolate: I used to like their
    Energy Chocolate (very dark colour and not very sweet) until the company

    It's never been good by Dutch/Belgian/Swiss[n] or even German
    standards ...

    was bought by Kraft in 2010, at which point their products quickly became inedible sweet junk.

    ... but yeah it used to be a lot better than it is now.

    [n] OK ok Nestle ... very sad.

    --
    Steve O'Hara-Smith
    Odds and Ends at http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jim Jackson@3:770/3 to Vincent Coen on Sun Apr 10 19:13:14 2022
    On 2022-04-08, Vincent Coen <nospam.Vincent.Coen@f1.n250.z2.fidonet.org> wrote:
    Hello All!

    I have noticed that for the Pi on both a 3B+ and a 4B 8GB Ram both using a HDD
    and SSD respectively there is no swap partition set up.

    Others have suggested why the default might be no swap for ther
    "standard" SD card run Pi. Alot of replies where off-topic without the
    courtesy of changing the subject line - sigh.

    You don't say what OS you are using. But I believe PiOS encourages the
    use of a swap file not a swap partition, using the utuility
    dphys-swapfile - see man page. Just editing dphys-swapfile config
    file (/etc/dphys-swapfile - at least on my old version PiOS) and
    restarting should work.

    Or running the dphys-swapfile utility would suffice ...

    sudo dphys-swapfile setup
    sudo dphys-swapfile swapon

    Goodle throws up some pages

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Brian Gregory@3:770/3 to Jim Jackson on Sun Apr 10 21:54:46 2022
    On 10/04/2022 20:13, Jim Jackson wrote:
    Others have suggested why the default might be no swap for ther
    "standard" SD card run Pi. Alot of replies where off-topic without the courtesy of changing the subject line - sigh.

    Surely the default for Raspberry Pi OS is a silly 100MB swap file on the
    SD card.

    --
    Brian Gregory (in England).

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From scott@alfter.diespammersdie.us@3:770/3 to The Natural Philosopher on Tue Apr 12 17:11:08 2022
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 11/04/2022 16:22, scott@alfter.diespammersdie.us wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    On Fri, 08 Apr 2022 15:05:11 +1200
    nospam.Shaun.Buzza@f110.n229.z1.fidonet.org (Shaun Buzza) wrote:

    For best performance, I would also ensure the swap partition was at the >>>> *front* on a HDD; for a SSD (or SD card), it wouldn't matter.

    Why ? Putting it dead centre of the tracks would seem to minimise >>> average seek time to the swap area.

    For spinning rust, data transfer rates are usually higher at the beginning >> of the disk than at the end.

    Not on a disk with constant sectors per track, it ain't...

    Try running some disk-benchmarking software on an old hard drive. You'll
    see faster transfer rates at the start than at the end.

    --
    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From scott@alfter.diespammersdie.us@3:770/3 to Ahem A Rivet's Shot on Tue Apr 12 17:08:04 2022
    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    On Mon, 11 Apr 2022 16:17:26 GMT
    Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:

    And now I walk around with a thumb drive in my
    pocket that cost me $1 per gigabyte.

    An expensive one then, they're running about 35-40c per gigabyte
    now in sizes up 512GB for thumb drives and a bit less for 1Tb drives from reputable suppliers.

    ...and even cheaper if you're not a stickler for brand names. The 128GB
    stick I keep on my keychain was under 18ยข/GB, and according to the seller, I bought it a year ago yesterday.

    By comparison, my first MB (as an expansion card for an Apple IIe) was
    closer to $200-$300 when I bought it maybe 31-32 years ago.

    --
    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)