WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Handle large files by utilising the swap space?  (Read 1495 times)

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Handle large files by utilising the swap space?
« on: April 17, 2011, 03:09:15 PM »
Read somewhere that when tmpfs runs out of memory it can utilize the swap space.  TC seems to be using tmpfs but only files smaller than the free memory can be handled.

Is there a way to extend TC's filesystem so it can hold large files temporarily by utilising the swap space?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Handle large files by utilising the swap space?
« Reply #1 on: April 17, 2011, 04:26:53 PM »
tmpfs mounted over / in TC by default amounts to 90% of available RAM.

When a lot of RAM is needed to be used by apps, then files stored in tmpfs would get swapped out to disk, I have observed such on several occasions.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Re: Handle large files by utilising the swap space?
« Reply #2 on: April 17, 2011, 05:01:17 PM »
What about when you want more space for files and not more memory for applications?  Can't I modify that 90% default?

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Handle large files by utilising the swap space?
« Reply #3 on: April 17, 2011, 09:04:48 PM »
Can't I modify that 90% default?

You can change the size at any time with:

mount -o remount,size=95% /

or
mount -o remount,size=3G /

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Re: Handle large files by utilising the swap space?
« Reply #4 on: April 18, 2011, 04:23:07 AM »
That's great. It has applications in virtualization. It can make a VM's swap space almost as fast as RAM.

Until there is no more RAM left and the VM's swap space gets as fast as the host's swap space.

[ By setting the swap space as a separate .vmdk that is non-persistent and has its REDO file in /home/tc/<VM-specific-directory> ]
« Last Edit: April 18, 2011, 04:25:11 AM by Ulysses_ »