12-08-2019, 04:12 AM | #1 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Slow VST scanning, project loading with LinVST
Hi,
I am new to Reaper on Linux. I used Reaper for a long time on Windows. I have Linux experience for almost 20 years and I would really love to do the transition with my music production stuff (amateur level). I compiled LinVST and got it working well. Low latency with ALSA, everything running sweet so far when processing. The only thing I can complain about are slow loading/scanning times for the VSTs. It takes 1-2 seconds for one VST instance to process. Scanning all plugins is painfully slow. This wouldn't be a problem, as you rarely do it, but it also happens when loading a project. In the shell window I see the VSTs being loaded, but some are really slow (e.g. FM8 or Battery 4). It takes 1-2 seconds for each INSTANCE to process. I see repeating output like Loading /home/username/.wine/drive_c/VST64/FM8.dll DSSI VST plugin server v0.986 Copyright (c) 2012-2013 Filipe Coelho Copyright (c) 2010-2011 Kristian Amlie Copyright (c) 2004-2006 Chris Cannam LinVst version 2.8.0 From my windows time I remember huge projects loading in a reasonable time. But now even a fairly small project takes 20 seconds to load. It's obvious that Wine and the LinVST wrapper will introduce overhead, but that much? I'm on a i7 4 core with 16GB RAM/SSD on Gentoo Linux x64 up to date. The machine is performing very well for all other tasks. ALSA latency is ~5ms without any tweaks I use Reaper 6.0.1 Linux native Wine staging 4.21 Gnome 3.32 Kernel 5.4.1 and set @users hard memlock 1000000 @users soft memlock 1000000 @users hard rtprio 99 @users soft rtprio 99 in /etc/security/limits.conf to satisfy LinVST Wineserver is already preloaded. What is your experience? Any ideas to speed it up? Greets Celphor |
12-08-2019, 09:20 AM | #2 |
Human being with feelings
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
|
I think it's one of the big disadvantages of linvst, not sure if there is anything you could tweak to improve it.
It would probably be better if linvst was a wine vst host running all the time, and presenting the plugins as a vst shell. Like that it wouldn't have to start new processes all the time. But let's not be too picky, it's already amazing that we can run plugins from a different operating system...!
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc. :) |
12-08-2019, 12:27 PM | #3 | |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Quote:
Maybe Airwave is what we want? Didn't try it |
|
12-08-2019, 08:20 PM | #4 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
The scanning shouldn't take that long.
Maybe it's a Wine/System thing. "It takes 1-2 seconds for one VST instance to process." It also depends on what the plugin does, MT-Powerdrumkit loads it's samples on startup and can have a delay. I do happen to have a LinVst version in the pipeline that does run all plugins in one Wine process, LinVst-X. That means that plugins can communicate ie GlissEQ Fabfilter ProQ-3 spectrums and Kontakt libraries not having to load samples for new instances etc. It also means that new instances and plugins load very fast once the server is up and running. The downside is that the plugins are not sandboxed and if one goes down then it might take everything down with it. It hasn't been straight ahead to get a one Wine process LinVst version that works efficiently and it's involved some not straight ahead programming. I can have the server shut down automagically if no plugins are left or just keep the server going regardless of how many plugins are loaded. The upside is with keeping the server going is that the scanning would be the fastest possible but the downside is that the user would need to kill the server manually or reboot but seeing that the server doesn't do much if no plugins are loaded then it can be just left to run I suppose. So I'm not sure about leaving the server running. I run it with the server always running. Last edited by osxmidi; 12-09-2019 at 12:12 AM. |
12-08-2019, 09:01 PM | #5 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
https://github.com/osxmidi/LinVst-X
The convert utilities need to be made (makefiles are in the convert folder) and the linvst convert file is linvstx.so instead of linvst.so for the usual LinVst. Makefile is in the convert folder or Makefile-linxconverttree for sub dir converting. Gtk 3 dev packages needed. If someone doesn't want to go through the above then linvstx.so could be renamed to linvst.so and then the usual LinVst convert utilities included in the LinVst binary release could be used. For the LinVst-X server the usual X11 and Wine dev packages and multilib are needed (details are in the LinVst Make guide on github, make then sudo make install It's best to use it with plugins that already work with LinVst and/or use TestVst. Last edited by osxmidi; 12-09-2019 at 12:12 AM. |
12-09-2019, 04:48 AM | #6 |
Human being with feelings
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
|
That's great news osxmidi! Thanks!
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc. :) |
12-09-2019, 07:32 AM | #7 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
@osxmidi: That's great news. I'm going to give it a try as soon as I can.
Thanks for your efforts in making things as smooth as possible! FM8 needs 2 seconds on my system and as far as I know it doesn't load big stuff. |
12-09-2019, 08:01 AM | #8 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Part of the problem is that LinVst needs to start a separate server Wine process for every plugin and that includes scans.
The LinVst-X server can be preloaded wine /usr/bin/lin-vst-server-x.exe.so for 64 bit plugins wine /usr/bin/lin-vst-server-x32.exe.so for 32 bit plugins LinVst-X has the server hang around once it's started and then it just accepts and loads (and scans) whatever plugins. LinVst runs sandboxed separate Wine processes and LinVst-X doesn't. Last edited by osxmidi; 12-09-2019 at 10:32 PM. |
12-09-2019, 08:05 AM | #9 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
btw LinVst-X is beta and I don't guarantee anything about how it performs.
|
12-09-2019, 02:13 PM | #10 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
I can't try it before next weekend :-(
|
12-10-2019, 05:59 AM | #11 | |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Quote:
Maybe there's a way to integrate it using the Reaper API. The downside of my life: I'm not 20 anymore and can not afford anymore to hack all night long ;-) |
|
12-10-2019, 06:14 AM | #12 |
Human being with feelings
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
|
FWIW, wineserver takes a few arguments so could be started from a script that starts reaper and then killed when reaper has exited. Try winserver --help at the command line, -p will make it persistent, and -k will kill it.
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc. :) |
12-10-2019, 03:33 PM | #13 |
Human being with feelings
Join Date: May 2017
Posts: 95
|
|
12-10-2019, 08:50 PM | #14 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
LinVst can be used together with LinVst-X, some plugins might suit LinVst more and some other plugins might suit LinVst-X. |
|
12-10-2019, 09:54 PM | #15 | |
Human being with feelings
Join Date: May 2017
Posts: 95
|
Quote:
thanks for all your work!! |
|
12-14-2019, 04:37 AM | #16 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
I've improved some response things, so if anyone is using LinVst-X then I would recommend that they update.
|
12-14-2019, 12:24 PM | #17 | |
Human being with feelings
Join Date: May 2017
Posts: 95
|
Quote:
What response things you updated? I allways look at your code to see what changes and understand nada. Also I love changelogs. I know those take time to write though. Edit: here are the screen captures Using 2.7 https://www.dropbox.com/s/sy530pnciu...X_2.7.mov?dl=0 Using git master https://www.dropbox.com/s/c423e0mh7m...aster.mov?dl=0 Last edited by kytdkut; 12-14-2019 at 12:40 PM. |
|
12-14-2019, 07:38 PM | #18 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
I'll change it back. The changes were for how much time the server idles. Last edited by osxmidi; 12-14-2019 at 07:44 PM. |
|
12-15-2019, 01:55 PM | #19 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
I gave LinVST-X a try now and was really impressed by the speed.
Until I restarted Reaper. Reaper hung and didn't do anything after showing the splash screen. I killed my ~/.config/REAPER, killed all wineservers but no way. I saw no linvst processes or wineservers running. Rescanning VSTs also hung Reaper. After treeconverting with the non-X linvst.so everything started again as it should. What might have made things hanging? |
12-15-2019, 08:10 PM | #20 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
I havn't had that happen. The lin-vst-server-x hangs around once it's started and restarting reaper or doing a rescan should just use the already running lin-vst-server-x server just like it initially did after the server was first started. So if the server just vanishes without a trace then I don't know what is causing that as the server usually needs to be killed to exit. If someone is trying to kill the server and the server is not killed properly then some shared memory can linger and that can interfere with future scans but a reboot will set it back to normal. Use htop to kill the server properly (when no plugins are loaded) and that deletes the shared memory as well. But usually the server should be just left to run and not be killed. There will be some changes soon as it's still in beta at this point. Last edited by osxmidi; 12-16-2019 at 12:23 AM. |
|
12-16-2019, 01:19 AM | #21 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
My problem is not the fact that something has crashed. It's software ;-) And I appreciate your work very much.
The strange fact is that there has been no indicator where the problem was. No stdout/stderr output, nothing. Just a Reaper hanging in the ropes. If you find the time it would be great to have some debug output and a debug option in the makefile. Btw: What development environment are you using? I earn my money with Java developement and can read C/C++ well enough to understand what's going on. But I have to setup a toolchain as I want to do some Reaper development again in the future (did some OSC-Bot stuff years ago). I ditched my last Windows machine at home now and it's a good time to move on |
12-16-2019, 02:15 AM | #22 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
One of the common problems is an unimplemented function in Wine. The vst might call some windows function and it hasn't been added to Wine and so --> crash. If TestVst is run from a terminal then Wine output can be seen and if the error is an unimplented function in xxxx.dll then that dll can be "overriden" with a real Windows dll by placing the real Windows dll into system32 (syswow64 for32 bits) and then the dll name gets added to the winecfg Libraries section. Some plugins run without a problem but there are going to be some plugins that don't because of various reasons ie the current state of Wine and what it can handle etc. Debugging needs to be done through WineDebug. On Linux I just use g++ (Wine has wineg++) for C++. btw I've made some updates to the LinVst-X code. Last edited by osxmidi; 12-16-2019 at 02:33 AM. |
|
12-16-2019, 12:42 PM | #23 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
I tried again with the lastest sources from today. Same problem.
After reboot, first start with Reaper, everything ok. Fired Reaper up a second time: Hangs and display message "LinVst server not found" after around one minute. If I preload the server it works again. So it seems to be a problem with the automatic start of the LinVst-server if it is not running. No biggie, but a little confusing ;-) |
12-16-2019, 07:35 PM | #24 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
After the server is started it's not supposed to exit. On the systems I've tested, Manjaro, Debian Buster/Stretch, the server sticks around after closing Reaper and then on reopening Reaper the server is already available to load plugins etc. |
|
12-17-2019, 07:49 AM | #25 | |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Quote:
Gonna give it another try during the holidays |
|
Thread Tools | |
Display Modes | |
|
|