WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: the Swap DRIVE/file (and Linux)  (Read 3936 times)

Offline cast-fish

  • Hero Member
  • *****
  • Posts: 1000
  • hi there
the Swap DRIVE/file (and Linux)
« on: September 16, 2014, 10:23:11 AM »
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


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: the Swap DRIVE/file (and Linux)
« Reply #1 on: September 16, 2014, 10:27:37 AM »
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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: the Swap DRIVE/file (and Linux)
« Reply #2 on: September 16, 2014, 10:31:39 AM »
You should not swap to pen drives.  Flash drives are slow and have limited write cycles.
When they fail, they fail completely.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: the Swap DRIVE/file (and Linux)
« Reply #3 on: September 16, 2014, 10:37:50 AM »
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.
« Last Edit: September 16, 2014, 10:39:40 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: the Swap DRIVE/file (and Linux)
« Reply #4 on: September 16, 2014, 10:54:02 AM »
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.
Download a copy and keep it handy: Core book ;)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: the Swap DRIVE/file (and Linux)
« Reply #5 on: September 16, 2014, 11:32:54 AM »
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.
« Last Edit: September 16, 2014, 11:59:51 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: the Swap DRIVE/file (and Linux)
« Reply #6 on: September 16, 2014, 11:48:54 AM »
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.
?
Download a copy and keep it handy: Core book ;)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: the Swap DRIVE/file (and Linux)
« Reply #7 on: September 16, 2014, 12:03:08 PM »
Oops - no, the other way round :P
Thanks for catching my nonsense Misalf - post in question corrected.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: the Swap DRIVE/file (and Linux)
« Reply #8 on: September 16, 2014, 12:06:16 PM »
Swap block devices predate Linux.
Swap has been around for a LONG time.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: the Swap DRIVE/file (and Linux)
« Reply #9 on: September 16, 2014, 12: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

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: the Swap DRIVE/file (and Linux)
« Reply #10 on: September 16, 2014, 06: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.
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: the Swap DRIVE/file (and Linux)
« Reply #11 on: September 16, 2014, 07: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?
« Last Edit: September 16, 2014, 10:45:25 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: the Swap DRIVE/file (and Linux)
« Reply #12 on: September 16, 2014, 07:10:09 PM »
By default Core is making use of zram swap which differs from zswap.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: the Swap DRIVE/file (and Linux)
« Reply #13 on: September 16, 2014, 09:49:45 PM »
AIUI zswap still needs a swap partition (or file?)  and I should have said zram  Oooops  my bad

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: the Swap DRIVE/file (and Linux)
« Reply #14 on: September 16, 2014, 10:44:42 PM »
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.]
Download a copy and keep it handy: Core book ;)