Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: cast-fish on September 16, 2014, 01:23:11 PM

Title: the Swap DRIVE/file (and Linux)
Post by: cast-fish on September 16, 2014, 01:23:11 PM
Hello,


TCL team and members....

well i could go on google searching "swap" drives and "swap" files  but it's maybe faster asking here

i Just wanted to clarify.....

i am using TCL with a "pen drive swap" (over usb 2.0)

TCL seems to be performing OK with this arrangement.

It is ok, right?...

------------------------------------------------------------------------

i never understood why there are also "swap files" as expanded upon the "swap partition" idea.  Semantics?

is it wise to use the bootcoade  "nozswap"  with a 256 ram laptop running TCL?

thankyou


V

Title: Re: the Swap DRIVE/file (and Linux)
Post by: bmarkus on September 16, 2014, 01:27:37 PM
There are cases where you do not have access to disk partitioning, therefore the only way is a swap file. It happenes when you have for example a VPS account at a service provider.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: gerald_clark on September 16, 2014, 01:31:39 PM
You should not swap to pen drives.  Flash drives are slow and have limited write cycles.
When they fail, they fail completely.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: bmarkus on September 16, 2014, 01:37:50 PM
Slow, compared to what? There are cases when it is your only choice.

Limited lifetime, in practice urban legend. I have never seen a single USB stick in last 10 years got defected due usage. Broken, yes. Lost, yes. Defected, not. But it is cheap. become faulty? Throw away and replace.

Do I have defected HDD's from all main vendors? Yes. I have cca. 6-8 on the shelve. They were just installed in a PC at home. No shocks, no vibration, no heat.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: Misalf on September 16, 2014, 01:54:02 PM
Quote
is it wise to use the bootcoade  "nozswap"  with a 256 ram laptop running TCL?
I'd say that depends on how much RAM is used by your setup and what apps you use. If it won't go over 180 MB or so, then you can use zswap which is faster than HDD swap. But while you're already using swap on another drive (which might not even be used for dayly tasks), it might not be necessary to waste RAM for zswap.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: tinypoodle on September 16, 2014, 02:32:54 PM
Swap partitions are a relic from the 2.4 kernel era, when they had a potential performance advantage over swap files.


I've only been happy with increasing zram swap to 90% on a box without hdd and 256MB RAM - I wouldn't think twice to exhaust zram swap before considering swapping to flash memory.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: Misalf on September 16, 2014, 02:48:54 PM
Quote
Swap files are a relic from the 2.4 kernel era, when they had a potential performance advantage over swap files.
Code: [Select]
... over swap partitions.
?
Title: Re: the Swap DRIVE/file (and Linux)
Post by: tinypoodle on September 16, 2014, 03:03:08 PM
Oops - no, the other way round :P
Thanks for catching my nonsense Misalf - post in question corrected.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: gerald_clark on September 16, 2014, 03:06:16 PM
Swap block devices predate Linux.
Swap has been around for a LONG time.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: coreplayer2 on September 16, 2014, 03:16:39 PM
Thankfully that in today's world RAM is cheap, very fast and comes in large quantities  :D

I'm a supporter of zswap
Title: Re: the Swap DRIVE/file (and Linux)
Post by: Misalf on September 16, 2014, 09:35:08 PM
I really like zswap, too.
My Netbook has 2GB RAM ~> 1.97GB RAM + 491MB Swap.
I don't even bother creating a swap partition/file. Current swap usage is 5.96MB but only because I compiled something today. I havn't seen anything else using swap yet.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: Misalf on September 16, 2014, 10:01:14 PM
Just out of curiosity, I've read that, on Windows 32bit with more than 4GB installed in the PC, one can still use the 'unreachable' RAM via RamDrive and put a swapfile there.
Can zswap zram swap use this area of RAM beyond 4GB or is there a similar thing like RamDrive for Linux to use the otherwise unused RAM?
Title: Re: the Swap DRIVE/file (and Linux)
Post by: tinypoodle on September 16, 2014, 10:10:09 PM
By default Core is making use of zram swap which differs from zswap.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: coreplayer2 on September 17, 2014, 12:49:45 AM
AIUI zswap still needs a swap partition (or file?)  and I should have said zram  Oooops  my bad
Title: Re: the Swap DRIVE/file (and Linux)
Post by: Misalf on September 17, 2014, 01:44:42 AM
Hmm, then the naming of the  nozswap  boot code could be kind of confusing (for people who know the difference).
Anyways, Of course I mean compressed swap in RAM, too. [Previous post edited.]
Title: Re: the Swap DRIVE/file (and Linux)
Post by: bmarkus on September 17, 2014, 01:55:42 AM
Read http://en.wikipedia.org/wiki/Zswap
Title: Re: the Swap DRIVE/file (and Linux)
Post by: curaga on September 17, 2014, 05:25:51 AM
Just out of curiosity, I've read that, on Windows 32bit with more than 4GB installed in the PC, one can still use the 'unreachable' RAM via RamDrive and put a swapfile there.
Can zswap zram swap use this area of RAM beyond 4GB or is there a similar thing like RamDrive for Linux to use the otherwise unused RAM?

There's no magic like that on Linux. On a 32-bit kernel you're limited to 4GB RAM, on a 64-bit kernel (or 32-bit + PAE) you can use it all. There's no reason not to use a 64-bit kernel if you have that much RAM, all apps are compatible.
Title: Re: the Swap DRIVE/file (and Linux)
Post by: cast-fish on September 17, 2014, 09:18:32 PM
Hello Team and members,


well....it seems the topic sparked a fair few postings about the topic  of swap.

THat's good right.

for me.....uh......just kind of leaving   my set up  while it works for what i need it to do...

it plays TV....full screen    filmon.com    (US and uk)    and also youtube and my chat cam web sites
are working good.


MOvies also work...from the free "REDDIT list" of free youtube hollywood movies.


Music works with streaming live web radio stations on ______mpg123      http


as the name implies,  "swapping' is kind of making a best of, but it seems to me that Tinycore
is so exceptionally well concieved that it's happy with any amounts RAM....covers a hardware
period of 15 years.  THere-abouts.

THankyou for your discussion , and i didn't want to open a can of worms for you.

Your support on this forum is very good.   Never a crossed line, and here to help.


many thanks


Vince.