VC> I have noticed that for the Pi on both a 3B+ and a 4B 8GB Ram both using VC> 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.
VC> Every other Linux system I have does even if the Ram is 16 GB so two VC> questions: VC> Is there a good reason why it does not get set up ? VC> 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?