On 9/30/23 07:46, Andy Smith wrote:
> Hello,
>
> On Sat, Sep 30, 2023 at 03:26:19AM -0400, gene heskett wrote:
>> On 9/29/23 17:32, Andy Smith wrote:
>>> On Fri, Sep 29, 2023 at 04:36:04PM -0400, gene heskett wrote:
>>>> Swap file is the last thing I want, much slower than a swap partition.
>>>
>>> There has been no performance difference between swap files and
>>> swap partitions for more than a decade.
>>
>> Maybe on wintel stuff, but the u-sd card the pi runs on has a write speed
>> below 10 megs/second, an extremely obvious performance hit, and wearing out
>> the u-sd card rapidly.
>
> Please show evidence or retract your claim that on a raspberry pi a
> swap partition performs better than a swap file (when they are both
> on the same storage device). I believe you are making it up, as it
> isn't the case in the kernel code and should not make any difference
> by architecture.
There is a huge difference in the write speeds between a modern SSD that
can be written at usb3 speeds, and the write speed of a micro-sd card
the pi boots from.
This is a real world fact Andy C. Tested, verified FACT.
For small writes it might approach the BS claims on the blister card but
rarely gets there, for megabyte and up writes its often below 10 megs a
second. The blister card may claim up to 120M/S, but dd shows that
outright lie when imaging a 64GB card with a 7G image, doing the last
75% of that 7G at less then 10M/S. On raspios-wheezy, swap was on the
u-sd card. And it took me 3 hours & change to build a realtime preempt
4.19 kernel for the pi, on the pi. Switch the swap to a sata-iii SSD on
a startech usb3-sata adapter, and that same kernel build is 23 minutes
on the pi, for the pi.
TL,DR, my experience is a fact. The medium differences which you keep
ignoring, is in FACT important.
> Swapping on SD cards in general is a bad idea regardless of
> architecture, but there should be no difference between swap file or
> swap partition. I did not suggest you swap to a file on SD card. I
> suggested that whether you swap to a file on SSD or a partition on
> SSD, the performance will be the same.
True, as long as both are on the SAME medium. However my experience with
swap files on pi's has been with swap files on the u-sd. They do work,
If you plan on a long nap while they work, and the u-sd card doesn't
wear out, which I have had happen on smaller cards. That upset me, a lot
as I had to rewrite a couple gigs of gcode that disappeared. That
taught me to include the pi in my amanda backups. Then I bought two
seacrate 2T rust buckets, spent about 6 weeks building up a buster on
the new, faster drives. And both drives disappeared off the end of the
cables 4 days apart a week later losing everything. Junk I didn't even
try to warranty. Burn me a third time and I'm all done with that name on
the box. Now I'm collecting 2T gigastones to do it again, about the same
price as the SamSung's, but turn them over and read "made in Taiwan"
Its been hell trying to make bookworm usable. And I seem to be headed
to do it again, the raid10 I built on bullseye for /home, is not
compatible with bookworm and no one can tell me what to do to fix it.
The problem is that ANYTHING that wants write access to that raid10 has
to wait anywhere from 30 seconds to 5 minutes to open the requestor. It
always works, all I have to do is wait, then wait some more. Wash, rinse
and repeat. That's BS and you all wonder why I am in such a bad mood.
It's also a puzzle. I have an AppImages directory off of /home/gene on
that raid10, and those AppImages work as instantly as one would expect
from a raid10 made of 4 1T SamSung 870 SSD's. 2, maybe 3 seconds to a
fully drawn screen ready to do work. Yet when one of those apps want to
write, its always blocked the first time by this wait but not there
after. But leave it running overnight, wash, rinse, repeat the delay
again the next day. Why?
Which is what I want to do. How? is the question...
Thank you, take care and stay well, Andy.
>
> Thanks,
> Andy