I see there are several configuration options with varying cost/benefit. I'd love to hear the bigwigs weigh in on the best way to go.
1. Give all ram to OS and PI. Swap to SSD.
2. Use some ram for swap ram disk along with SSD.
3. If we are upgrading ram should we give it all to OS and PI or devote some to ram disk
4. If we are upgrading should we be adding second SSD or ram for ram disk (or OS/PI).
This depends on your hardware and processing requirements. Some worth noting points:
- When you configure several disks for parallel swap storage in PixInsight, each swap file is spread on all disks in equal chunks (to be more precise, swap files are divided into equal chunks larger than 4 KiB). Let Sm be the size of the
smallest swap disk (in terms of available disk space), and N be the number of swap disks. Then the total amount of swap data that can be stored by an instance of the PixInsight Core application is N*Sm. This is relevant to using RAM disks for swap file storage, since RAM is generally a scarce resource.
- In practice, you may need 32 or 64 GiB of RAM (depending on the complexity of your projects) to use RAM disks for swap file storage effectively in real-world processing works. For example, with 64 GiB of RAM, you can use a RAM disk of 32 GiB and two disk drives for a total amount of 96 GiB swap storage, while still leaving 32 GiB of RAM for the application.
This benchmark is an example with a 16 GiB RAM disk configured in parallel with one SSD drive and a rotational drive (SATA 6 Gb/s), for testing purposes, where I achieved 3391 MiB/s on Linux. The
same machine with a single SSD drive achieves 2072 MiB/s.
With two SSDs and one rotational drive achieves 2751 MiB/s. In these examples, the SSD drives are connected to the motherboard's SATA interface (Intel X79 chipset) and the rotational drive to a dedicated hardware RAID PCIe card (this is important for the reasons described in the next point).
- Several fast hard drives connected to motherboard SATA ports may not perform as well as expected for parallel I/O. The total bandwidth of the SATA controller has to be divided by the number of drives. When the controller gets saturated, there is no benefit in adding more disks.
- For the best performance, a dedicated RAID PCIe card with several SSD drives is the best option in my opinion. For example, in the workstation used for the benchmarks linked above, I opted for an
LSI MegaRAID SAS 9271-4i, which has 4 SATA/SAS internal ports and a transfer rate of 6Gb/s
per port. Right now this card is being used for two huge RAID 1 arrays so unfortunately I can't use it for benchmarks with SSDs, but as soon as I can I'll make some tests.
- Each operating system poses its own tradeoffs. On relatively powerful machines, Linux is IMHO the most efficient platform for PixInsight. The benchmarks expose (confirming our day-to-day experience) that the Linux kernel is hard to beat in terms of disk cache management. On Mac OS X and Windows, RAM disks and parallel swap disks provide more performance benefits.
- Irrespective of all of the above, SSDs and more RAM are always good to improve your user experience with PixInsight. The benchmark attempts to provide you with objective insights about the best ways to optimize your hardware resources.