osxmidi / LinVst

Linux Windows vst wrapper/bridge
GNU General Public License v3.0
674 stars 41 forks source link

LinVst became very CPU-intensive since a few days for an unreproducible reason #217

Closed GoaSkin closed 2 years ago

GoaSkin commented 2 years ago

Hello,

my issue may sound a little bit rediculous but I am using LinVst for many years now and I never had any performance problems on my system which currently runs on an i7-9700K with 32GB RAM.

But since a few days, any Windows VST plugin which is loaded by LinVST produces a lot of CPU load and if there are more than 2-3 VST plugins are used in a DAW project, a fluent playback is impossible because the CPU load exceeds 100%. Before, 20 and more plugin instances in a DAW project weren't a problem.

I haven't installed any updates on my system before these performance problems began. Just afterwhile, I tried out to install the latest version of WINE-staging, the latest Linux Kernel and also to recompile LinVST. This doesn't make any difference. I also tries to replace LinVST with LinVST-X but regarding the CPU load, this also doesn't make any difference. Everything ran well since the update to Ubuntu 22.04 for around a month.

Looking in the process list using htop, each lin-vst-servertrack.exe instance is listed with 30 to 40% CPU load.

Operating System: Ubuntu 22.04 Kernel: 5.15.0-33-lowlatency CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz WINE-STAGING: 7.9 LinVST: 4.77 DAW: Bitwig Studio 3.3.11

Has anybody an idea what the reason for my performance problems could be?

osxmidi commented 2 years ago

Hello,

my issue may sound a little bit rediculous but I am using LinVst for many years now and I never had any performance problems on my system which currently runs on an i7-9700K with 32GB RAM.

But since a few days, any Windows VST plugin which is loaded by LinVST produces a lot of CPU load and if there are more than 2-3 VST plugins are used in a DAW project, a fluent playback is impossible because the CPU load exceeds 100%. Before, 20 and more plugin instances in a DAW project weren't a problem.

I haven't installed any updates on my system before these performance problems began. Just afterwhile, I tried out to install the latest version of WINE-staging, the latest Linux Kernel and also to recompile LinVST. This doesn't make any difference. I also tries to replace LinVST with LinVST-X but regarding the CPU load, this also doesn't make any difference. Everything ran well since the update to Ubuntu 22.04 for around a month.

Looking in the process list using htop, each lin-vst-servertrack.exe instance is listed with 30 to 40% CPU load.

Operating System: Ubuntu 22.04 Kernel: 5.15.0-33-lowlatency CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz WINE-STAGING: 7.9 LinVST: 4.77 DAW: Bitwig Studio 3.3.11

Has anybody an idea what the reason for my performance problems could be?

It could be various things.

Something has probably changed somewhere, whether it is wine or Ubuntu it is hard to say.

If something changed in the video systems, then that could be it, but it is hard to say for sure.

I will try to look into it.

There is also the option of installing the liquorix kernel.

Does it happen with older versions of linvst?

GoaSkin commented 2 years ago

Thanks for your reply.

I still don't know the reason for this behavior but what I have found out so far:

1.) Beside Bitwig, I tried out a demo of Reaper. Loaded by Reaper, die plugins run performantly.

2.) If I start the X-Server without the NVIDIA drivers, the performance is more bad

3.) If I raise the latency in the JACK setup, the Windows plugins become usable in Bitwig again but with an higher latency

I will try out an older version of LinVst soon and report. Already tried an older version of WINE (5.10; has no influence). Which older version of LinVst shall I try?

osxmidi commented 2 years ago

Thanks for your reply.

I still don't know the reason for this behavior but what I have found out so far:

1.) Beside Bitwig, I tried out a demo of Reaper. Loaded by Reaper, die plugins run performantly.

2.) If I start the X-Server without the NVIDIA drivers, the performance is more bad

3.) If I raise the latency in the JACK setup, the Windows plugins become usable in Bitwig again but with an higher latency

I will try out an older version of LinVst soon and report. Already tried an older version of WINE (5.10; has no influence). Which older version of LinVst shall I try?

Try 4.76

LinVst-4.76.zip LinVst-master.zip

GoaSkin commented 2 years ago

If I replace 4.77 by 4.76, everything runs very performant. I downloaded and compiled the LinVst-master.zip. I replaced 4.77 by 4.76 and back again a few times and found out that 4.76 is usable in my case but 4.77 not.

Is it possible that the performance behavior depends on the meta data Bitwig gets when scanning the plugins? Possibly, 4.77 also ran well a few days because Bitwig didn't perform a re-scan immediately after the update.

But now, I am happy with 4.76. Thanks a lot.

If I should do any other tests or try out any custom code, let me know!

osxmidi commented 2 years ago

If I replace 4.77 by 4.76, everything runs very performant. I downloaded and compiled the LinVst-master.zip. I replaced 4.77 by 4.76 and back again a few times and found out that 4.76 is usable in my case but 4.77 not.

Is it possible that the performance behavior depends on the meta data Bitwig gets when scanning the plugins? Possibly, 4.77 also ran well a few days because Bitwig didn't perform a re-scan immediately after the update.

But now, I am happy with 4.76. Thanks a lot.

If I should do any other tests or try out any custom code, let me know!

I"m not quite sure what is causing it to be honest.

I installed Ubuntu 22.04 to have a look at what it might be but linvst 4.77 seemed ok on an i5 and Ubuntu 22.04.

Sometimes things can just happen due to a particular current system setup, I suppose.

If linvst 4.76 runs ok then stick with that version for a while.

The main difference between linvst version 4.77 and 4.76 is that 4.77 has a drag and drop update.

Thanks for the testing offer, l'll keep it in mind if l need something tested.

osxmidi commented 2 years ago

I tested LinVst 4.77 with the Bitwig 4.3 Demo on Ubuntu 22.04 with the low latency kernel and it seemed ok.

Maybe it's due to some quirk with Bitwig version 3.3 and how it interactes with newer wine versions.

vssasks commented 1 year ago

It's the same with all software like reaper v3 could handle buffer 64 without xruns that's not possible with later reapers with each new reaper more cpu hungry. Not only binaries become bloated they become slower. They even block some best pro quality vsts/dx from the past internally under crashes excuses. But all low quality plugs always work fine :))

vssasks commented 1 year ago

Compilers themselves have become bloated, compare gcc from 1999 vs todays' monster. And old code from that era even won't compile on modern gcc... but do we really see any improvement in speed and features vs that era?