Author Topic: LTSpice runs slow on Apple Silicon M1  (Read 6817 times)

0 Members and 1 Guest are viewing this topic.

Offline JDW

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: jp
Re: LTSpice runs slow on Apple Silicon M1
« Reply #25 on: September 08, 2022, 06:41:59 am »
I read your note in the linked groups.io thread...
This sounds to me like the machine is thrashing - suffering from a deep lack of RAM, and using paging to disk or slower memory, or simply falling out of L2/L3 CPU cache while trying to cope with a large working set despite low RAM. It's generally not possible to add memory to a lot of Macs, so the approach unfortunately has to be to reduce the complexity of the simulation.
Thank you for the analysis and suggestions.

As I mention later in that discussion, it is absolutely, positively not a lack of memory.  I have 32GB and I confirmed in Activity Monitor that not even a single big of SWAP it used.  (When you run low on RAM, swap is used.)  I also have a super fast Apple internal 1TB SSD, so writes to/from that SSD are not slow.  That pretty much leaves the "memory leak" you mentioned being perhaps the cause.  But that is something on an OS level that I have no control to fix.  We also don't know if it is that.

All I can say is that I am missing MacOS High Sierra.  I only updated because some software I need to use and test requires Mojave minimum.  People often mocked me for not being on Mojave, but I knew that something would go wrong when I upgraded, and sure enough, it did. :-(
 

Offline montemcguire

  • Regular Contributor
  • *
  • Posts: 88
Re: LTSpice runs slow on Apple Silicon M1
« Reply #26 on: September 08, 2022, 06:46:03 am »
Ugh!

Let me think some more and see if I can come up with anything more.
 
The following users thanked this post: JDW

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6201
  • Country: ro
Re: LTSpice runs slow on Apple Silicon M1
« Reply #27 on: September 08, 2022, 07:11:07 am »
If the slowdown is specific to a certain schematic only, then try to change the "Default Integration Method", either from control panel or by specifying the method inside the schematic, by adding a spice directive like this:
Code: [Select]
.options method=gear

Offline JDW

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: jp
Re: LTSpice runs slow on Apple Silicon M1
« Reply #28 on: September 08, 2022, 07:30:46 am »
...try to change the "Default Integration Method", either from control panel or by specifying the method inside the schematic, by adding a spice directive like this:
Code: [Select]
.options method=gear

Fascinating.  Changing from "modified trap" to Gear resulted in the simulation speed going back to the great speed I had when using MacOS High Sierra!  The main downside is that it doesn't fix UI slowness when dragging inside the waveform to Zoom.  But simulation is significantly faster while using Marching Waveforms.

I must assume that Gear is less accurate because it's so much faster?  When I zoom into the ripple on the voltage output of my simulated switcher, the sawtooth is less consistent with Gear than with "modified trap."

Very interesting!  Thank you for the suggestion.

However, the UI slowness is still there.  In the early part of the simulation, with Marching Waveforms ON, clicking on a menu takes 2 seconds for it to drop down.  But at about the 18ms point in the simulation, it takes 40 seconds for menus to drop down!  Then after the simulation is done, clicking to drag within the plot window is very, very slow.  So while using Gear helps, it's not a solution for the root problem.
« Last Edit: September 08, 2022, 08:16:20 am by JDW »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf