Author Topic: Setting up a SSD as a Swap Drive  (Read 4539 times)

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Setting up a SSD as a Swap Drive
« on: 2015 July 04 19:31:52 »
I have several drives, one a SSD and the other two are standard SATA platter hard drives. I'm guessing that there is no point in other hard drives other than the SSD being used for swap space. Point is I'm not sure what is most appropriate in how to set the drive up. Is there a drive size that is more advantageous? I have the swap drive currently set as seen below. The drive is also set for a swap drive in Photoshop CS5. Is there a set of instructions for setting the drive up to be optimized for PI as a swap drive?

Thanks,

Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Setting up a SSD as a Swap Drive
« Reply #1 on: 2015 July 05 06:11:36 »
I would experiment with more swap threads. Try one per physical CPU core and use the benchmark to see if there's an improvement. Otherwise it looks good to me.

How large is the SSD? The only reason to include the HDDs in the swap is to increase the total swap space. If the SSD is large enough then there is no reason to do that as doing so will slow overall swap performance. I would think 64GB is more than enough swap although my rig works just fine with 32GB (I combine my SSD with a RAM disk).

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Setting up a SSD as a Swap Drive
« Reply #2 on: 2015 July 05 09:05:15 »
The drive itself is a Samsung 840 EVO 500 GB drive with 452 GBs free. I'll add the additional threads and test. Thanks for the advise.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Setting up a SSD as a Swap Drive
« Reply #3 on: 2015 July 05 09:45:22 »
Josh,

I've read through the postings on the Benchmark Test and don't really see what changes other than the swap space make. I started with 2, increased to 4, and now 8. It seems on single tests there is an increase on the swap numbers. But what are the conditions that make the system perform optimal? As an example, I have a i7 2600K CPU rated at 3.2 GHz, 32 GBs RAM, a 1 TB Samsung 850 EVO SSD as the system drive (C), and several other standard SATA HDs for storage, as well as a Samsung 840 EVO SSD being used as a swap disk for several programs as indicated in the earlier post. While testing I also have several programs open such as Chrome (as I'm writing this) and MS Outlook along with 20 process icons displayed in the System tray (AV, MW, Dropbox and so on). Do these conditions make it less favorable for benchmark tests?

Thanks Again,

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Setting up a SSD as a Swap Drive
« Reply #4 on: 2015 July 05 10:14:47 »
The total swap space is determined by the number of sources (not threads) times the smallest source. If you have one source then PI will use all the free space as available swap (of course it may not need it all). It sounds like your SSD is plenty big enough for use as a single swap source.

I have the 250GB version of the same SSD. I could certainly have used it alone as a single swap source to maximize swap space. But in my testing I found combining it with a 16GB ram disk (out of 32GB total RAM) had a measurable and, more importantly, noticeable performance improvement so I went that way. This means I am limited to 32GB of total swap space (two sources times 16GB) but I have not yet encountered any problem.

As far as benchmarking is concerned, PI will always perform best if it is the only application running. This is always true whether benchmarking or in normal use although the difference may be slim and the convenience of running the multiple applications may outweigh the performance gain. I would treat your benchmark results as relative anyway. You can run your benchmarks with other applications running as long as you have them running for all your benchmarks. It's just easier to control your benchmarks if you only have PI running. Once you have determined the optimal number of threads you can just leave it there and be happy.

You also have to decide how much time you want to spent tweaking your system because all of these changes are only incremental improvements. You may be able to eek out an additional 10% but if you are already enjoying short wait times then the time spent to get that gain may not be worth it. If a given long running process is taking 10 seconds you don't want to spend an hour tweaking to get that 1 second back. But if that same process is taking 10 minutes maybe you do.

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Setting up a SSD as a Swap Drive
« Reply #5 on: 2015 July 05 10:51:03 »
Josh,

The biggest lag I ever see is waiting for the cache to be read. I've seen processes seem to take 10-15 seconds or longer to say start alignment of twenty images. Once it starts it goes fast but the lag before starting is something I don't remember in earlier versions. I've never timed the lag but it seems excessively long at times. I've also noticed when calibrating a series of images it will do 8 at a time and then write them to disk before continuing. There's always a pause before starting up again. I assume the group of eight is based on the number of cores my processor has.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Setting up a SSD as a Swap Drive
« Reply #6 on: 2015 July 07 07:52:24 »
There are certainly some processes that benefit from swap more than others and some not at all. Some are CPU bound rather than memory bound. You can find that one process doesn't itself benefit but because it loads the data into swap subsequent processes benefit.

However, I have not seen a process be stagnant for 10-15 seconds before running fast. Are you saying the alignment does nothing for that long? If so, I would say something other than swap is at play.

I also don't think your observation of batching by 8 has to do with the number of cores. I would think PI starts the threads it needs and they are distributed to the available cores. Again, something else is going on here. Are these experiences with your SSD or with your HDD?

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Setting up a SSD as a Swap Drive
« Reply #7 on: 2015 July 07 09:46:25 »
I just checked the calibration again and it went fine without issue. Calibrated 12 STL-11000 images binned 2x2 in just over 16 seconds. Aligning the images was 28 seconds but it paused to load the cache first maybe 10 seconds. I've never read up on the use of threads and cores so I can confidently say I have no knowledge of how these work together. I do know that the programs need to be written to take advantage of this ability but that's about all.

Steve
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: Setting up a SSD as a Swap Drive
« Reply #8 on: 2015 July 07 11:42:06 »
Hello Steve

Perhaps you have set the disc to turn off when not in use (windows power management settings)
This  may introduce such a delay ....

Geert
Geert Vanhauwaert

Offline sreilly

  • PixInsight Padawan
  • ****
  • Posts: 791
    • Imaging at Dogwood Ridge Observatory
Re: Setting up a SSD as a Swap Drive
« Reply #9 on: 2015 July 07 13:48:43 »
Good thought Geert but it's while the cache is loading. I don't allow the computer to sleep or the HDs to turn off. But another thought is where the cache is located. If it's on the root drive then it would be my highest performing SSD and should be lightening fast I would think. Don't get me wrong, this is a fast system but the delay on loading the cache is a slow start. I'm not even sure how the cache is cleared.
Steve
www.astral-imaging.com
AP1200
OGS 12.5" RC
Tak FSQ-106ED
ST10XME/CFW8/AO8
STL-11000M/FW8/AO-L
Pyxis 3" Rotator
Baader LRGBHa Filters
PixInsight/MaxIm/ACP/Registar/Mira AP/PS CS5

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: Setting up a SSD as a Swap Drive
« Reply #10 on: 2015 July 08 06:00:17 »
Hello David

If you are refering to disk cache, this is located in RAM.
Here a link (there are many on internet) to a howto clean cache: http://medicine.arizona.edu/helpdesk-article/clear-memory-cache-windows-7.

Regards
Geert
Geert Vanhauwaert