Author Topic: What is the “swap” in Benchmark? (Swap performance drop in < 1 yr)  (Read 895 times)

Offline AnakChan

  • Newcomer
  • Posts: 11
Hi,

Can someone please help confirm if the “swap” in Benchmark script is the swap size? Less than a year ago, my then-new iMac Pro 18-core/64GB RAM/4TB SSD with PI 1.08.05.1352 & whatever MacOS version back then (can’t remember if Mojave then), my swap was clocking 13376 2415 MiB/s.

Now almost a year later, exact same setup but with PI 1.08.06.1457 and Mojave, my swap dropped a dramatically 3976 717.83 MiB/s.

I’ve added up to 8 more swap directories and restarted PI but the swap still hovers around the 35xx->43xx mark but never to the 13xxx I had last year. My 4TB SSD still has approx 1.6TB free.

Cheers,
Sean

Offline AnakChan

  • Newcomer
  • Posts: 11
I've gotten an answer to my question that the "swap" in Benchmark is merely a score, but not swap size. I've tested and confirmed the added swap directories are working as expected (repeated du's on the directory to ensure the swapdir was being used). I've also gone back to the older PI 1.08.05.1352 and the performance cannot be replicated as it was last year. Rather strangely BlackMagicDesign Disk Speed Test is showing consistently high read/write performances as it was last year as it is now  ~2850-2990MB/s.

The only variable I can think of right now is going from MacOS High Sierra last year to the current Mojave and something there has changed in the way how PI interacts with the OS.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi Sean,

Actually, we have seen a very small improvement in transfer rates after updating some of our Mac machines to 10.14 Mojave. Nothing essential, and definitely nothing that can justify such a difference, has changed in version 1.8.6 of PixInsight related to swap file generation, access or management. Something else should have changed in your machine to justify this.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline AnakChan

  • Newcomer
  • Posts: 11
Thank you for your reply Juan. May I know how to troubleshoot that? It’s def not hardware as I’ve not added anything new to my iMac Pro (no new external disks, etc.). Could it be some software library instead? I take it I could run the benchmark script in debug mode somehow?

It’s particularly strange that Disk Speed Tests is showing high performance off my internal SSDs but not for PI.

I’ll try to post snippets of my benchmarks & output txt dump from the console when I get home.

Offline AnakChan

  • Newcomer
  • Posts: 11
Here’s an output from the console from the benchmark run, and screenshot last year’s performance as a comparison.

Offline AnakChan

  • Newcomer
  • Posts: 11
Sorry for the thread updates. I created RAM disks (both APFS and HFS+ versions) and was able to get back to the performances that I used to have last year. So for the short term I have this workaround at least. However I don’t recall creating RAM disks last year.

So, for now I can only get the likes of ~2500 MiB/s via RAM disks, but otherwise with the internal iMac Pro SSD, I can get only ~720 MiB/s. I’ll try to reset my PRAM when I get home and see if that helps.

Offline airscottdenning

  • Newcomer
  • Posts: 19
Probably off-topic, but I have 64 GB of RAM. Shouldn't my performance be pretty independent of swap?

When I monitor my system during big processing tasks it never shows PI using ore than 32 GB used.

I could make RAM disks for swap, but if I have enough RAM shouldn't the swap be unnecessary?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
PixInsight stores pixel data for image history states as disk swap files. RAM is never used to store them. This is by design, with the purpose of maximizing RAM availability for PixInsight and other applications, including multiple instances of PixInsight (up to 255) that can run concurrently on the same machine.

On macOS and Windows, if you want to use your RAM for swap file storage in PixInsight, you have to create a RAM disk. On Linux this is not necessary, since the default system temporary directory (/tmp) uses the tmpfs filesystem, which is allocated dynamically in RAM by the Linux kernel. You can use tmpfs on Linux also on a different directory if you want.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline AnakChan

  • Newcomer
  • Posts: 11
@Juan, on your Mojave installations, what kind of swap scores do you get with your SSD? Is that with or without RAM disks? I spent a little bit of time doing an analysis of the iMac Pro W-xxxx bases submissions into http://www.pixinsight.com/benchmark and most of the good swap scores I've seen are with High Sierra (10.13) and those with Mojave (10.14) get lower scores similar to mine. The only exceptions were those which used RAM disks.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Here are some benchmarks on a MacBook Pro 2018 (i9-8950HK, 32 GB of RAM):

macOS 10.14.2 18C54, Apple SSD 2TB, 4 threads:
https://pixinsight.com/benchmark/benchmark-report.php?sn=Y1TCBU53355T77OKZBXN23P72L5LO4RV

macOS 10.14.2 18C54, RAM disk, 6 threads:
https://pixinsight.com/benchmark/benchmark-report.php?sn=0169XSRE9Q3A7W7P85FLBTZVCJP7MP5J

Windows 10 Pro on a Bootcamp partition, Apple SSD 2TB, 4 threads:
https://pixinsight.com/benchmark/benchmark-report.php?sn=80577S2K79UUOHW7I71LX9EDTM5E2Q3L

Windows 10 Pro on a Bootcamp partition, Apple SSD 2TB, 1 thread:
https://pixinsight.com/benchmark/benchmark-report.php?sn=87U8E1CX52L341C356RGWOH09WIX57ZJ

I didn't make a benchmark on macOS with a single thread on the SSD, but here is a benchmark posted by a user with an identical machine and an Apple SSD 1TB, 1 thread, macOS 10.14.2:
https://pixinsight.com/benchmark/benchmark-report.php?sn=13402677KX34209W5S9MLOWIOMXKHQU9

As you see, macOS and Windows show basically the same performance for single-threaded disk access. However, with multiple threads, Windows is faster. I'm just stating some facts; I don't have an explanation for this.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/