Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

PixInsight swap performance dropped in 10 mths (iMac Pro)

  • Please log in to reply
16 replies to this topic

#1 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 18 February 2019 - 12:23 AM

I’ve asked this in the PI forums however I’m new there and am more familiar with the folks here, so thought of asking this here.

 

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



#2 StephenW

StephenW

    Viking 1

  • -----
  • Posts: 768
  • Joined: 04 Feb 2005
  • Loc: San Jose, CA

Posted 18 February 2019 - 12:40 AM

>Can someone please help confirm if the “swap” in Benchmark script is the swap size?

 

No, it's the swap performance "score" and data throughput.

 

>I’ve added up to 8 more swap directories and restarted PI

 

How many were you using before hand?  I've seen several test results that indicate that having too many entries can hurt performance.

 

And I assume you hit "global apply" after adding the entries to make sure they were applied & remembered.

 

FWIW: I greatly increased my swap score/throughput by configuring a RAM disk - really makes a huge difference in performance.  With 64GB RAM you should be able to easily set some aside.



#3 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 22909
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 18 February 2019 - 12:59 AM

I think there are some general misconceptions about swap. A "swap" file in PI is really a state file, tracking the state of a viewport before an operation is run so you can undo the operation. The "swap performance" is really just the time it takes to write this data. Outside of that initial writing, swap actually has no other impact on the performance of most of PI's processes. A noise reduction or deconvolution process will take the same amount of time to run regardless of how fast your swap performance is, as those processes tend to be CPU bound. 

 

I've seen marginal differences in my overall PI performance depending on where I store my swap files, but it is nothing mindblowing. The difference between say 8k swap score and 25k swap score amounts to a few seconds overall in the total processing time. It might be 57 seconds with swap on an SSD, and 52 seconds with swap in a RAMDisk. Because the bulk of the process is heavily CPU bound, or even general I/O bound, rather than primarily dependent on the performance of your swap space. 

 

The processes that take the most time for me are usually noise reduction and deconvolution. For neither of those have I ever seen much more than a few seconds difference in total processing time due to differences in swap speed. For most other things I do, the processing usually doesn't take more than a few seconds total, so saving a couple seconds out of a few seconds...well, I would hardly notice the difference and most of the time I spend processing is my own manual overhead. 


Edited by Jon Rista, 18 February 2019 - 12:59 AM.

  • Jim Waters, pfile, Dean J. and 1 other like this

#4 StephenW

StephenW

    Viking 1

  • -----
  • Posts: 768
  • Joined: 04 Feb 2005
  • Loc: San Jose, CA

Posted 18 February 2019 - 01:09 AM

Yes, yes, but if you are trying to max out your score on the PI Benchmark page it is important! ;)  Every second counts! :)

 

But agreed - it is only a small part of the overall benchmark score, and in the real world most of the time is spent doing other things that writing/reading files to disk.



#5 james7ca

james7ca

    Fly Me to the Moon

  • *****
  • Posts: 6700
  • Joined: 21 May 2011
  • Loc: San Diego, CA

Posted 18 February 2019 - 01:48 AM

On your SSD, are you sure that TRIM is enabled? If you installed a third-party drive then the Mac OS TRIM feature for SSDs may or may not be enabled. I'm pretty sure you can check this using the Terminal command line and if TRIM is not enable then it's likely that you SSD performance has degraded significantly over time.

 

Here is an article that discusses this issue:

 

  https://www.howtogee...ds-on-mac-os-x/

 

And another article for Mac OS El Capitan and later:

 

  https://support.4it....osx-el-capitan/

 

Here is how my SSD is listed under About This Mac > System Report > SATA/SATA Express 

Attached Thumbnails

  • System Report SATA SATA Express 2.jpg


#6 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 18 February 2019 - 01:57 AM

So the setup prior to adding the swap dirs, was 1 by default. I can’t remember what I had before last year but I believe it would have been 1 only too (since back then it was a fresh PI installation on a brand new iMac Pro). Yes I applied global and restarted PI, and even rebooted my iMac Pro (usually my iMac Pro is up for like over a month b4 I reboot it). I’ve also killed all apps to have only PI running.

 

Now here’s the strange part, BlackMagicDesign Disk Speed Test has been consistent last year and this year overnight around the 2850 - 2990MB/s. Disk Speed Test has not varied over time.

 

My total time for benchmarks used to be 25 sec, but now it’s 43-44 sec. 

 

E17D801F-B4FD-4831-BDBF-7DB9338FF1CD.jpeg

F2505333-9CF1-435C-8102-7E58CC3C18EC.jpeg

 

I even went back to PI 1.08.05.1352 and it has not helped. The only other thing I can think of is MacOS Mojave has changed something drastically from High Sierra for PI but (without going back to High Sierra), I don’t know how to test that.

 

I understand benchmarks aren’t anything however I did invest an expensive setup (iMac Pro) mostly for PI.

 

Edit: Yes my 4TB SSD is TRIM Support enabled.


Edited by AnakChan, 18 February 2019 - 02:01 AM.


#7 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 22909
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 18 February 2019 - 02:32 AM

So the setup prior to adding the swap dirs, was 1 by default. I can’t remember what I had before last year but I believe it would have been 1 only too (since back then it was a fresh PI installation on a brand new iMac Pro). Yes I applied global and restarted PI, and even rebooted my iMac Pro (usually my iMac Pro is up for like over a month b4 I reboot it). I’ve also killed all apps to have only PI running.

 

Now here’s the strange part, BlackMagicDesign Disk Speed Test has been consistent last year and this year overnight around the 2850 - 2990MB/s. Disk Speed Test has not varied over time.

 

My total time for benchmarks used to be 25 sec, but now it’s 43-44 sec. 

 

attachicon.gif E17D801F-B4FD-4831-BDBF-7DB9338FF1CD.jpeg

attachicon.gif F2505333-9CF1-435C-8102-7E58CC3C18EC.jpeg

 

I even went back to PI 1.08.05.1352 and it has not helped. The only other thing I can think of is MacOS Mojave has changed something drastically from High Sierra for PI but (without going back to High Sierra), I don’t know how to test that.

 

I understand benchmarks aren’t anything however I did invest an expensive setup (iMac Pro) mostly for PI.

 

Edit: Yes my 4TB SSD is TRIM Support enabled.

Your CPU score changed as well, and usually the CPU score stays about the same even if swap changes. I wonder if Mojave did change something... I program on macs every day. I've noticed that certain things have become a little glitchier since I updated to Mojave. I work with some very large code volumes, which need to be indexed, and indexing times have almost doubled... 



#8 drmikevt

drmikevt

    Viking 1

  • *****
  • Posts: 814
  • Joined: 22 Jun 2015
  • Loc: Burlington, VT

Posted 18 February 2019 - 07:38 AM

Here is how my SSD is listed under About This Mac > System Report > SATA/SATA Express 

Newer computers do not have SATA connections anymore and this information is now in the NVMExpress tab, just FYI!



#9 james7ca

james7ca

    Fly Me to the Moon

  • *****
  • Posts: 6700
  • Joined: 21 May 2011
  • Loc: San Diego, CA

Posted 18 February 2019 - 10:03 AM

Newer computers do not have SATA connections anymore and this information is now in the NVMExpress tab, just FYI!

True, most current Macs use PCIe-based SSDs including the OP's iMac Pro. But, the standard iMac still comes with a SATA interface, in fact some models come only with HDs.



#10 CharlesW

CharlesW

    Long time member

  • ***--
  • Posts: 3471
  • Joined: 01 Nov 2012
  • Loc: Chula Vista, CA

Posted 18 February 2019 - 10:27 AM

Dumbest guy in the room, here. I would also make the suggestion that you don’t forget to try odd number swap directories. On my iMac Pro I found that nine directories gave me the best performance. 



#11 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 18 February 2019 - 09:20 PM

I’ve run out of ideas. I’ve reduced my swapdirs to 7 (odd number), no difference. I’ve also re-upgraded my Java to the latest and it’s still the same. I’m not certain what other libraries or apps that may have conflicted with PI for the slowdown.

 

Anyone else knows of what PI is based on? Maybe I’ve installed some GitHub lib that’s inadvertently slowed down PI? Not certain how to put PI Benchmark in debug yet. I’ve attached my Benchmark output console for those who may be more savvy at reading this.

 

Attached File  PIBenchMarkOutput.txt   19.41KB   1 downloads

 

Short of getting an external Thunderbolt3 SSD with High Sierra installed, not certain how else to test.

 

Edit: I managed to get my performance back by creating 4x 8GB RAM Disks. However I’m pretty sure I didn’t need to do that last year (as I’ve only now learned how to create RAM Disks on MacOS). As such I still wanna debug a little more to see why I need RAM disks now, but didn’t before.


Edited by AnakChan, 18 February 2019 - 10:01 PM.


#12 pfile

pfile

    Aurora

  • -----
  • Posts: 4878
  • Joined: 14 Jun 2009

Posted 18 February 2019 - 10:22 PM

when did the AFPS transition happen? i assume your SSD is formatted with AFPS; were you running AFPS on high sierra as well? i have prevented my machines from using AFPS just out of an abundance of caution, so i'm still running journaled HFS+. and i'm still running High SIerra so i can't test this out for you. i did just try the benchmark on the latest PI with 4 swap directories, 2 each on NVMe SSDs and got ~18000 for my swap performance number...

 

are the ramdisks you created AFPS or HFS? maybe you can change that up and see what happens.

 

rob



#13 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 18 February 2019 - 10:31 PM

when did the AFPS transition happen? i assume your SSD is formatted with AFPS; were you running AFPS on high sierra as well? i have prevented my machines from using AFPS just out of an abundance of caution, so i'm still running journaled HFS+. and i'm still running High SIerra so i can't test this out for you. i did just try the benchmark on the latest PI with 4 swap directories, 2 each on NVMe SSDs and got ~18000 for my swap performance number...

 

are the ramdisks you created AFPS or HFS? maybe you can change that up and see what happens.

 

rob

 

Internal SSD hadn’t changed since purchase (despite upgrade from High Sierra to Mojave late last year). Dunno format type - whatever the default Apple has from point of sales.

 

The RAMDisks were HFS+. RDP to my desktop @ home now it a little slow midday in Tokyo over 4G. I’ll try again after the peak period is over.

 

Edit: Benchmark times dropped from 45 sec down back to the 25-26 sec after RAMDisks added. I’m excited again :D.


Edited by AnakChan, 18 February 2019 - 10:32 PM.


#14 pfile

pfile

    Aurora

  • -----
  • Posts: 4878
  • Joined: 14 Jun 2009

Posted 18 February 2019 - 10:38 PM

well what i meant was that at some point along the line, apple decided AFPS was ready for primetime and started converting boot disks from journaled HFS+ to AFPS behind your back, as you installed the new OS. so it was at least possible that the last time you ran the benchmark, your boot disk was formatted HFS+ and not AFPS (but is presumably AFPS now).

 

so i guess if you wanted to get some data on this, you could create AFPS ramdisks and see if the performance drops.

 

the ramdisk size will eventually limit the size of the project you can have going. PI saves the image history for every single image open on every single desktop, and i don't think it ever throws anything away (meaning, your undo history is infinite subject to swap volume space.) so when the swap space is full i assume PI will refuse to let you do anything to any open image, or create a new image. but i've never actually tested that...

 

rob



#15 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 19 February 2019 - 12:46 AM

Switched RAM disk from HFS+ to APFS. It’s just as fast. So it’s not the FS type. So, it seems just adding a RAM disk seems to have restored the performance that I used to have. I’m pretty sure I did not create a RAM disk last year to get that performance, but will continue digging.

 

About the RAM disk limit, just add another swap that’s a real disk/SSD.



#16 pfile

pfile

    Aurora

  • -----
  • Posts: 4878
  • Joined: 14 Jun 2009

Posted 19 February 2019 - 01:01 AM

ok well that eliminates the AFPS thing, i guess.

 

yes true, adding a non-ramdisk will work, but i think that PI tries to write to all of the swap locations in parallel, so you may end up with disk-speed performance if you have a mix of real disks and ramdisks. worth testing.

 

anyway something is definitely wrong - you shouldnt have to add a ramdisk to get decent swap speeds with these fast SSDs. does blackmagic have a small-file test? i assume that PI's writes to the swap area are pretty small. obviously an SSD doesn't have to seek like a regular hard disk so small writes should be less demanding, but maybe the blackmagic test does not behave the way PI does.

 

rob



#17 AnakChan

AnakChan

    Viking 1

  • -----
  • topic starter
  • Posts: 720
  • Joined: 01 Sep 2014

Posted 19 February 2019 - 01:07 AM

I think there is a way to test small files with BlackMagic Disk Speed Test but I have no baseline since last year I ran it with the default block sizes. I’m also gonna try to reset my PRAM/SMC when I get home from work too to see if that helps.

 

Agreed that RAM disk is merely a workaround masking the underlying issue of slow SSD performance for PI.

 

Edit: Reset PRAM/SMC did not help. Went into SafeMode and also tried but also slower performance. So right now, the only way of getting the high swap scores I had was to use RAM disks (in whatever HFS+ or APFS format).

Edit2: BlackMagic Disk Speed Tests tried different 1G -> 5G and still consistently high read/write performances.


Edited by AnakChan, 19 February 2019 - 07:27 AM.



CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics