NeuralAmpModelerPlugin icon indicating copy to clipboard operation
NeuralAmpModelerPlugin copied to clipboard

[BUG] NAM works fine at 128 samples, but eat huge cpu percentage at 256 and higher?

Open DivannKokos opened this issue 9 months ago • 3 comments

Thanks for taking the time to write a bug report! Use the following prompts to help you describe what's going on. The more info you provide, the easier it'll be to understand how to fix it for you without having to come back and ask you questions.

Before you make a new bug report:

  • [X] Have you searched the Issues to see if your problem has already been reported? If it has, please follow that Issue instead of opening a duplicate!
  • [X] Have you checked the Rough edges for help?

Description

NAM is seems to be "tuned" for low latency, and that hurts higher latencies. Explanation: for me NAM actually works at 128 samples, better than at 512 samples latency. 16 samples - 50% RT CPU, hitches. 32 samples - 4% RT CPU, 64 samples - 2-3% RT CPU, 128 samples - 1,0% RT CPU during playback, 256 samples - SKYROCKETS! to 120-150% RT CPU, massive hitches, 512 samples - SKYROCKETS! to 150-170% RT CPU, massive hitches. And then more samples - more RT CPU usage and more hitches.

Tested using VST3 in Reaper v7.36 using Audient ID4 Asio driver, and happened with at least two Ryzen CPU, Ryzen 7 2700x and Ryzen 7 7700.

To reproduce

Steps to reproduce the behavior:

  1. Set your latency in ASIO for anything higher than 256 samples.
  2. Playback audio
  3. Observe CPU usage and listen for hitches.

Expected behavior

Plugin should work fine at lower samples if PC can handle it, can work fine on higher samples, instead - it works worse on higher latencies.

Screenshots

Image - 128 samples

Image - 512 samples

Computer & other info

(please provide the following information):

  • OS Windows 11, 23H2
  • RTX 4060
  • v 0.7.13, but I think I observed this behaviour on earlier versions too.
  • VST3
  • Reaper
  • Audient ID4 MK2
  • 48KHZ
  • Listed above
  • Provide a model that the bug happens with (except if the bug happens without a model loaded) - I personally have multiple NAMs with different models stacked in project, but I'm not sure whether this behaviour happens only with multiple nams or not, and if model matters. - Folder with two nam models - https://drive.google.com/drive/folders/1WoSbFnh1k6IiVhmfhypLtqzER2dZhhAd?usp=sharing
  • Provide an IR that the bug happens with (except if the bug happens without an IR loaded) - IR makes no difference.
  • Does the bug not happen under some other conditions? If you can find what one thing makes the difference between the bug appearing and not, this drastically improves the chances I can fix it. - Listed above.

Additional context

Of course I understand that such plugins are expected to used at more lower latencies, but that shouldn't mean that higher latencies need to awful.

DivannKokos avatar Apr 16 '25 00:04 DivannKokos

I have done thorough testing and I was able to confirm that NAM Universal misbehaves and is not setup properly for multithreading in FL studio. Each instance uses one CPU core!

Additionally, what the @DivannKokos reports about the number of samples is correct as well - about 20% CPU per instance of NAM at 128 samples, doubles to 40% per instance above 256 samples, and reaches up to 60% per instance above that.

ldubnitzky avatar Sep 27 '25 02:09 ldubnitzky

Additionally, what the @DivannKokos reports about the number of samples is correct as well - about 20% CPU per instance of NAM at 128 samples, doubles to 40% per instance above 256 samples, and reaches up to 60% per instance above that.

Just for curiosity, what is your CPU? AMD Ryzen too, or an Intel one?

DivannKokos avatar Sep 27 '25 02:09 DivannKokos

Additionally, what the @DivannKokos reports about the number of samples is correct as well - about 20% CPU per instance of NAM at 128 samples, doubles to 40% per instance above 256 samples, and reaches up to 60% per instance above that.

Just for curiosity, what is your CPU? AMD Ryzen too, or an Intel one?

Intel Core i9-12900H

ldubnitzky avatar Sep 27 '25 03:09 ldubnitzky