Author Topic: Swap Files and Ram Disk  (Read 3691 times)

Offline Narrowbandpaul

  • Newcomer
  • Posts: 10
Swap Files and Ram Disk
« on: 2015 December 15 10:31:56 »
Hi All,

Newbie to pixinsight and parallel swap file stuff. I have added 4 lines and 8 lines that point to the same temp folder as the default i.e.just copying that same location 8 times. I'm not sure really what I'm doing, or if I'm doing it right. Should I point to several different temp folders?

anyway the results so far using the benchmark....

1 reference (default) 1.5Gb/s
4............................1.8Gb/s
8............................2.1Gb/s

so 40% improvement. Happy with that but wondering how to extract more. Its a high end SSD and I have 32Gb of 2400Mhz HyperX RAM.

As may be apparent I don't really know what I'm doing. I am trying to learn, I am reasonably tech savvy but not to this extent.

I am reading up about RAMdisks and they sound good but unsure how to configure and maintain one and what the pitfalls are.

Any advice you guys might have greatly appreciated.

Cheers
Paul

 

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Swap Files and Ram Disk
« Reply #1 on: 2015 December 15 10:56:33 »
The main issue with using RAM disks for PI swap is their limited size. The total amount of PI swap is equal to your smallest swap source times the number of sources. If you have a RAM disk alone then of course you are limited to that size (say 16GB) which will likely not be enough for certain kinds of processing. If you add an SSD to go along with that RAM Disk you will now have 32GB even if the SSD has 100's of GB available. The recommended PI swap size is 64GB.

Don't confuse swap threads with swap sources. You declare multiple swap threads per source to improve performance but they don't increase total swap size.

Offline Narrowbandpaul

  • Newcomer
  • Posts: 10
Re: Swap Files and Ram Disk
« Reply #2 on: 2015 December 15 12:20:09 »
Its a 512GB SSD. So even if I use a 16GB RAMdisk and the SSD I am limited to a 32GB swap size?

If so then maybe I'll stick to the SSD alone then unless there are other options?

Thanks 

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Swap Files and Ram Disk
« Reply #3 on: 2015 December 15 13:16:51 »
Its a 512GB SSD. So even if I use a 16GB RAMdisk and the SSD I am limited to a 32GB swap size?

That's right. Introducing a RAM disk is a trade off between speed and capacity. It depends on the type of processing you do. I've been running with 32GB of swap (/tmp in RAM which is an option on Linux plus SSD) for some time and have never had a problem of running out of swap.

It's also debatable if the speed of a RAM disk is worth it. It makes your benchmark look nice but in the real world the SSD may be plenty fast enough on its own. 

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Swap Files and Ram Disk
« Reply #4 on: 2015 December 15 14:18:44 »
Its a 512GB SSD. So even if I use a 16GB RAMdisk and the SSD I am limited to a 32GB swap size?

That's right. Introducing a RAM disk is a trade off between speed and capacity. It depends on the type of processing you do. I've been running with 32GB of swap (/tmp in RAM which is an option on Linux plus SSD) for some time and have never had a problem of running out of swap.

It's also debatable if the speed of a RAM disk is worth it. It makes your benchmark look nice but in the real world the SSD may be plenty fast enough on its own.

For undoing / redoing processes and going through the process history of an open image is crucial to have at least an SSD, and much better to work on RAM, specially if your image is big or your history is long. It's very annoying to me to have to wait some seconds to have an image in the history step you want. Some times you do this continuously, so waiting those seconds repeteadly is extremely painful.


Best regards,
Vicent.

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Swap Files and Ram Disk
« Reply #5 on: 2015 December 16 08:11:50 »
Paul,

It also makes a huge difference as to what operating system you are running PI on.  I have used it on both Windows and OSX but they crawled compared to my current set up which is a Linux machine running Mint 17.2.  Even for a neophyte it was easy to set up and it is blazingly fast.

For what its worth, I run using a 16GB ramdisk and also point to several swap folders on my SSD and have never had an issue, even processing large files (60 subs). 

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse