Which Puppy Linux for a beginner?

New to Puppy and have questions? Start here

Moderator: Forum moderators

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Which Puppy Linux for a beginner?

Post by greengeek »

dimkr wrote: Fri May 31, 2024 6:09 am

Puppy configures swap so it's used only when running really low on memory, so compression and decompression begin and increase CPU usage only in emergency situations.

My experience is that a Puppy being used without savefile configures swap differently than you have suggested here.
In that circumstance where no savefile is in use - Puppy grabs about a third of the swap partition and uses it as virtual RAM - and does not wait until "running really low on memory" to do so.

This is pretty useful when using machines that only have 2GB or so of real RAM. It makes the difference between choking the machine totally or else being able to continue as normal (albeit slowly). I have been able to do video processing that consumes several GB of RAM on a machine with only 2GB of RAM - by having a huge swap partition and not using savefile. Cannot see how this could be done with zram as described.

Sure - zram may be faster at small tasks - but how would it help with multi GB video processing??

dimkr
Posts: 2429
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1203 times

Re: Which Puppy Linux for a beginner?

Post by dimkr »

greengeek wrote: Fri May 31, 2024 9:38 am

My experience is that a Puppy being used without savefile configures swap differently than you have suggested here.

This line in rc.sysinit is unconditional:

Code: Select all

echo 5 > /proc/sys/vm/swappiness

It runs no matter what kind of swap you use - if it's a file, a partition or zram.

If you don't have it, maybe that's why your Puppy uses so much swap.

greengeek wrote: Fri May 31, 2024 9:38 am

Sure - zram may be faster at small tasks - but how would it help with multi GB video processing??

Decompressing a block that's already in RAM is very likely to be faster than reading uncompressed data from disk to RAM. Your system will be slower if you're constantly using swap, no matter what kind of swap it is, especially if RAM consumption is many GBs bigger than the amount of RAM you have (because this means you're reading and writing whole GBs to swap). With a slow spinning hard drive, swap can be slow to the point your system freezes every time you *start* to use swap, even without filling swap.

User avatar
greengeek
Posts: 1384
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 535 times
Been thanked: 192 times

Re: Which Puppy Linux for a beginner?

Post by greengeek »

dimkr wrote: Fri May 31, 2024 10:04 am

This line in rc.sysinit is unconditional:

Code: Select all

echo 5 > /proc/sys/vm/swappiness

I think you are misinterpreting how Puppy builds its virtual RAM when running without savefile.

dimkr
Posts: 2429
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1203 times

Re: Which Puppy Linux for a beginner?

Post by dimkr »

@greengeek If I understand rc.sysinit correctly, it unconditionally
1) Searches for a swap partition (on all disks)
2) Falls back to pupswap.swp, if it exist in the save partition
3) Falls back to zram

User avatar
wizard
Posts: 1989
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2659 times
Been thanked: 694 times

Re: Which Puppy Linux for a beginner?

Post by wizard »

@greengeek

wizard wrote: ↑Wed May 29, 2024 7:16 am

Also make sure you don't have a swap file on your drive, otherwise F96 won't set up the zram.

Does this advice also relate to users who have a swap partition? Or just specific to swap file?
(Don't really know what F96 does with zram - i am wondering if it is similar to what most Puppies do with pseudo RAM when they boot in Live mode with a save partition present))

Tested F96CE_4 on internal HDD. A swap file or swap partition will take precedence over zram and zram will not be setup.

In a lot of cases low power computers have both a slow CPU and HDD. ZRAM will then out perform a swap file or swap partition in terms of speed. In cases like you describe where a lot of extra "ram" is required, the swap file or swap partition would be needed, but at the sacrifice of performance.

Thanks
wizard

Big pile of OLD computers

Post Reply

Return to “Beginners Help”