Author Topic: Can I get some help with the Parallel Swap set up in Linux?  (Read 2998 times)

Offline Eleven

  • Newcomer
  • Posts: 7
I'm not quite understanding what to do. I have 16bg of RAM and a 16bg swap file. What's the best way to utilize the parallel swap file setup? Do I need a ramdisk to mount to point to? Or do I need to mount my swap file or some other new partition to use?

I am running linux mint on a laptop with only one SSD. So what ever I have to do, I need to do it all on the one SSD.

Offline Eleven

  • Newcomer
  • Posts: 7
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #1 on: 2016 July 14 08:11:44 »
No love for this question huh?

Since I only have room for one SSD, what about using my SD reader and a fast Micro SD card, or one of my USB3 ports and a fast flash drive? Would those be sufficient to use as swap for PI?

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #2 on: 2016 July 14 09:30:09 »
Here's my understanding: The goal is to have at least 60GB of swap available. Less may work fine depending on your camera and how many files your process at once. The size of available swap is equal to the smallest source times the number of sources. If you have only 16GB of RAM then a RAM disk or moving tmp to RAM is not really a good option as it will limit the total unless you have a lot of sources. Mixing slower sources (like hard drives) with a RAM disk will also degrade the performance of the swap. I would not consider using an SD reader for swap. It's just not fast enough. If you can't devote space on your internal SSD (there's nothing wrong with the swap being on the one internal SSD) I think your next best choice would a USB3 SSD or Hard Drive. Be aware that if you connect an SSD to USB3 you may not get the full potential of the SSD as you'll be limited by the bus so don't overspend on that SSD.

Aside from swap sources to improve capacity you also can declare multiple swap threads for the same source. This can improve the performance but does not affect capacity. You have to experiment with your particular hard ware to see what the optimal number of threads may be.

You can use the bench mark script to compare swap configurations but be aware gains are not always comparable to real world performance. Some feel the swap component of the benchmark is overstated and some PI processes use more swap than others. You want to spend your time processing images and not fiddling with swap configurations!

I hope that is helpful.

Offline Eleven

  • Newcomer
  • Posts: 7
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #3 on: 2016 July 14 13:06:23 »
I hope that is helpful.

Thanks for the reply. I tried setting 4 instances each on a USB3 Flash Drive and an SD card. It seems PI starts up a little slower, but I think the processing is a little faster. I have some room on my SSD to redo the partitions and give PI it's own partition for swap, and as long as it's mounted at startup it's always there for me to use for other things.

The problem with the USB and SD reader is that I have to remember to have them plugged into the laptop when I start PI :)

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #4 on: 2016 July 14 14:00:40 »
You don't need to partition the SSD to use it for swap. You can just create a folder and point your swap source there.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #5 on: 2016 July 14 14:41:14 »
the write speeds of a USB flash drive are going to be pretty slow vs. a real SSD... while they are made out of the same thing, inside the SSD there are a bunch of flash chips in parallel but in the USB flash drive there is typically only one or two dies, and i think all writes are done serially to one or the other.

read speeds are more reasonable on the USB3 flash but still nowhere near the SSD.

rob

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Can I get some help with the Parallel Swap set up in Linux?
« Reply #6 on: 2016 July 15 08:05:09 »
As stated above, if you are using a ramdisk, make sure it is set to use only half of your available ram.  As an example, I have 32Gb of Ram so my ramdisk is 16Gb.  If you have 16, make the ramdisk 8.   
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