Old 06-16-2020, 12:34 PM   #1
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default Please remove

I started this thread being basically an Ubuntu user (Xubuntu, Ubuntu Studio, Mint, you name it). The fact is that, after all this time, I switched to a combination of Manjaro, Yabridge as a Windows VST bridge, and a fork of Wine called Wine TKG (https://github.com/Frogging-Family/w...g-git/releases), all of which has allowed me to use, for example, Kontakt and other heavy stuff in Linux in a similar way to Windows (with an expected but rather small and absolutely negotiable dose of overhead). I give this as an example of a task which takes realtime audio in Linux to its limits.

Robbert-vdh (the developer of Yabridge) has given me an absolutely priceless feedback. As he has kindly pointed out to me during my transition, the main bottlenecks regarding such an intensive task as bridging Windows plugins in Linux lay both in the kernel used by Ubuntu and many other distros, together with some inherent lacks in the Wine department, solved by Wine TKG, Wine-Nspa and possibly other forks. I'm talking here about bridging Windows plugins, but take into account that this also affects realtime audio in general. And what's even more bizarre is that, at least in Manjaro, most of the suggested audio tweaks that dozens of threads/sites recommend here and there, in fact seem to hurt the performance notably, as I could test out myself. All I have needed in Manjaro is to do three things :

1 - Add my user to the audio group

sudo gpasswd -a user group

(Replace "user" by your username and "group" by audio).

2 - Set the CPU governor to performance

[EDIT] The following procedure hasn't given me a 100% reliable solution in my machines. Hence I downloaded an app from Manjaro's package manager called cpupower-gui which allows me to set, with great detail and in a visual manner, the speed and governor of each CPU core. Up to this date (April 11th), it still has a bug where it won't load a custom profile on log in -if you don't want to set the desired profile each time -, but anyway it's a great little tool that allows you to check easily the real CPU speed of your machine. Other people use TLP, a similar but more complex app, to achieve similar things.

I'll leave the - supposedly - basic procedure, just in case you want to try it out. I suggest downloading cpupower-gui, anyway, and checking out that the desired result is really achieved :



Download with the Add/Remove software a tool called cpupower

Then, in /etc/default/cpupower, do the following :

Uncomment

#governor='ondemand'

and change it to

governor='performance'

Then, in the terminal

sudo systemctl enable --now cpupower


3- Install Wine-TKG (with just a double-click in the downloaded file) and enable this variable in /home/user/.profile for Wine TKG to perform its magic :

export WINEFSYNC=1


That's all in my case. As I said before, when I added the tweaks usually recommended elsewhere, things got notably worse. Your mileage might vary drastically, of course, but Manjaro at least seems to need very few tweaks to perform great.

So, everything you will read from me below, before January 2021, is not valid anymore (in fact, you will notice it refers to other distros). This first post condenses my most valuable finds since I started with Linux.

Last edited by Soli Deo Gloria; 04-11-2021 at 07:44 AM.
Soli Deo Gloria is offline   Reply With Quote
Old 06-16-2020, 12:48 PM   #2
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

So, here is my latest issue... the realtimesystemconfigurationquickscan gives me all "good" for all topics. BUT... my Komplete Audio 6 USB card gives a plethora of sound interruptions, during which I even see the meters of the tracks go down and up again, as if something mutes them temporarily. This happens mostly with Kontakt/Wine/LinVST and/or a combination of Piano In 162 in Linux Sampler and a heavy dose of Zyn Fusion with laaarge release and lots and lots of sustain pedal, just to stress things out. The same in Win 7 does not seem to give problems. Ubuntu Studio has Rtirq installed, but it doesn't seem to be properly configured, or at least I think so, given the results I'm still getting. Even a single instance of Kontakt with the Challen piano of Cinesamples' Abbey Road Pianos (a heavyweight, I know) brings the audio card to its knees.


With the command sudo /etc/init.d/rtirq status, I managed to get these results :

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
156 FF 95 - 135 0.2 S irq/23-ehci_hcd
157 FF 94 - 134 0.8 S irq/23-ehci_hcd
10 TS - 0 19 0.1 S ksoftirqd/0
18 TS - 0 19 0.1 S ksoftirqd/1
etc...


The ehci_hcd seems to be the Komplete Audio card, so, it should be given RT priorities without a problem.


But, if I type the command systemctl status rtirq, I get this :

● rtirq.service - LSB: Realtime IRQ thread tunning.
Loaded: loaded (/etc/init.d/rtirq; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)


Which seems to indicate that Rtirq is inactive, in spite of having started it with the corresponding command (sudo /etc/init.d/rtirq start).


The rtirq file in /etc/default/ has these values :



RTIRQ_NAME_LIST="ehci_hcd"

# Highest priority.
RTIRQ_PRIO_HIGH=95

# Priority decrease step.
RTIRQ_PRIO_DECR=5

# Lowest priority.
RTIRQ_PRIO_LOW=51

# Whether to reset all IRQ threads to SCHED_OTHER.
RTIRQ_RESET_ALL=1


But anyway, the USB sound card continues xrunning like crazy. So, I invite you, charitable souls, to contribute with your insights, since I'm lost here.


Thanks so much in advance!
Soli Deo Gloria is offline   Reply With Quote
Old 06-16-2020, 01:19 PM   #3
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

Quote:
Originally Posted by Soli Deo Gloria View Post

[...]

But, if I type the command systemctl status rtirq, I get this :

● rtirq.service - LSB: Realtime IRQ thread tunning.
Loaded: loaded (/etc/init.d/rtirq; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)


Which seems to indicate that Rtirq is inactive, in spite of having started it with the corresponding command (sudo /etc/init.d/rtirq start).
This is what I get with that command.

● rtirq.service - LSB: Realtime IRQ thread tunning.
Loaded: loaded (/etc/init.d/rtirq; generated)
Active: active (exited) since Tue 2020-06-16 08:46:05 CDT; 6h ago
Docs: man:systemd-sysv-generator(8)
Process: 781 ExecStart=/etc/init.d/rtirq start (code=exited, status=0/SUCCESS)

Jun 16 08:46:04 DW systemd[1]: Starting LSB: Realtime IRQ thread tunning....
Jun 16 08:46:05 DW rtirq[781]: Setting IRQ priorities: start [ehci_hcd] irq=16 pid=103 prio=95: OK.
Jun 16 08:46:05 DW rtirq[781]: Setting IRQ priorities: start [ehci_hcd] irq=23 pid=104 prio=94: OK.
Jun 16 08:46:05 DW systemd[1]: Started LSB: Realtime IRQ thread tunning..
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 06-16-2020, 09:19 PM   #4
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

You've got it active, indeed. With systemctl status rtirq, mine says : "inactive (dead)" and I can't figure out why... I changed the USB hub for the audio card and gave a 95 RTPrio only for it..

Now, with sudo /etc/init.d/rtirq status, I get :

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
158 FF 95 - 135 5.4 S irq/28-xhci_hcd
10 TS - 0 19 0.3 S ksoftirqd/0
18 TS - 0 19 0.2 S ksoftirqd/1
etc...


But the outcome is just the same : xruns and xruns with the USB sound card. An old M-Audio PCI card I had installed does behave much better, by the way, but it's more convenient for my work to use the USB card. I still haven't foud a single piece of information that is completely clear about this subject. I hope someone can give any insight into this...

Last edited by Soli Deo Gloria; 06-16-2020 at 09:43 PM.
Soli Deo Gloria is offline   Reply With Quote
Old 06-17-2020, 07:11 AM   #5
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

I even set the IRQ of the soundcard (28 in this case) to realtimesystemconfigquickscan, and it now gives a report with all the parameters OK. I'm stuck here...
Soli Deo Gloria is offline   Reply With Quote
Old 06-17-2020, 07:17 AM   #6
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
I changed the USB hub for the audio card and gave a 95 RTPrio only for it..
When you say "USB hub" you don't mean you are using an external USB hub do you, because those are bad news for anything time critical.

Here's a thought. Do all the files you've modified have root permissions? Seems I remember modifying some file in the past and it wouldn't execute because it had my user but not root permissions.

Another thought. Is the rtirq service started?

sudo /etc/init.d/rtirq start

The above command comes back with the following here.

Setting IRQ priorities: start [ehci_hcd] irq=16 pid=103 prio=95: OK.
Setting IRQ priorities: start [ehci_hcd] irq=23 pid=104 prio=94: OK.
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 06-17-2020 at 07:26 AM.
Glennbo is offline   Reply With Quote
Old 06-17-2020, 07:52 AM   #7
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Well, I managed to get it active by running something which I read somewwhere, by chance : sudo systemctl enable rtirq and rebooting (by the way, this isn't even mentioned on the Rtirq github page, which is absolutely crazy! The crux of Linux, really : even devs don't explain things clearly...).


So, now, according to realtimesystemconfigquickscan, I have everything OK, Rtirq is active and the sound card is exclusively set to RTprio 95, but the sound interrupts continue (!!!!!!!).


Now, take a look at this :






I 'm playing a combination of Piano In 162 in Linux Sampler and Zyn Fusion with a heavy patch. Both tracks are processed with some intensive FXs. On my old M-Audio Audiophile 192 PCI card this plays nice (albeit with a noticeably low gain level). Now, with the USB Komplete Audio 6, if you pay attention from 9 to 10 seconds onwards, the meters of both tracks go down and up. It's not just stutter, some crackles or processing artifacts, as usual. These are complete interrupts of the sound, even to the point that the audio of the instruments shut down for a while and then reinit. Even if I leave the keys pressed, it happens the same : there are "cuts" in the meters every X seconds...


If I get to know the cause of this, I guess all the other parameters of the system are now tuned. But this nut is really hard to crack...
Soli Deo Gloria is offline   Reply With Quote
Old 06-17-2020, 08:21 AM   #8
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

What happens if you increase your latency to the next higher number, or increase the number of periods?

Reason I ask is when I went from a pair of M-Audio Delta 2496 cards to my current Behringer UMC1820 I did have to increase the number of periods from three to four, and my projects hit the limit on running 64 samples latency sooner than happened with the M-Audio PCI cards. By the end of my most recent project I had upped the latency to 128, but used 64 when tracking the initial bass, guitar, and drums tracks.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 06-17-2020, 08:37 AM   #9
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

This may not be in any way helpful, but the NI Komplete 6 was a problematic USB audio device and many users reported poor performance on both OSX and Windows.

It mainly had to do with the KA6 using a separate/proprietary safety buffer in their drivers which basically had to be used to get decent performance. It wouldn't be using that under Linux, which could be crippling the box without it, regardless of buffer settings. The box was designed to use that extra buffer for everyday use, so if it's not there it may be the cause of your massive xruns.

I know USB audio devices should be fairly apples to apples on Linux, but as NI did something non-standard/proprietary with their drivers, you may want to try another device and see if you have the same degraded performance.
Klangfarben is offline   Reply With Quote
Old 06-17-2020, 08:39 AM   #10
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

I'm on 128 latency buffer, and even if I set the periods to 8, I get the exact same results. AND, what's craziest, is that even if I set the buffer to 2048, it gives the same results (!!!!!!!).


Something here is quite wrong...
Soli Deo Gloria is offline   Reply With Quote
Old 06-17-2020, 08:59 AM   #11
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
I'm on 128 latency buffer, and even if I set the periods to 8, I get the exact same results. AND, what's craziest, is that even if I set the buffer to 2048, it gives the same results (!!!!!!!).


Something here is quite wrong...
My guess is it has to do with the proprietary safety buffer NI put in their drivers I'm referring to above - which again wouldn't be there under Linux. You could put extra periods and up the buffer all day long, but if the box is designed to perform well only with their own proprietary safety buffer engaged, it wouldn't help in the slightest. It also probably wouldn't rear its head as much for the average user that doesn't have heavier VSTi usage. At the very least trying a different device would give you an indication whether you are looking at a device issue or something else.
Klangfarben is offline   Reply With Quote
Old 06-17-2020, 09:11 AM   #12
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by Klangfarben View Post
This may not be in any way helpful, but the NI Komplete 6 was a problematic USB audio device and many users reported poor performance on both OSX and Windows.

It mainly had to do with the KA6 using a separate/proprietary safety buffer in their drivers which basically had to be used to get decent performance. It wouldn't be using that under Linux, which could be crippling the box without it, regardless of buffer settings. The box was designed to use that extra buffer for everyday use, so if it's not there it may be the cause of your massive xruns.

I know USB audio devices should be fairly apples to apples on Linux, but as NI did something non-standard/proprietary with their drivers, you may want to try another device and see if you have the same degraded performance.

Hmmm, well, I'm just trying out an old Fast Tack Pro, and it does just the same. Really weird : some kind of periodic sound drops. The thing is, that I'm noticing that it happens particularly between Wine FXs and the USB card (be it NI or M-Audio). It doesn seem to happen with Linux native plugs. Now, what can it be? Wine RT permissions, or something like that?
Soli Deo Gloria is offline   Reply With Quote
Old 06-17-2020, 12:01 PM   #13
lilith93
Human being with feelings
 
lilith93's Avatar
 
Join Date: Apr 2018
Location: Karlsruhe
Posts: 486
Default

What happens if you put some Diva instances in Reaper? Do you also get xruns?
__________________
https://soundcloud.com/lilith_93
https://open.spotify.com/intl-de/art...SMSwCW9VkqAN9Q
MX Linux, Behringer UMC 204 HD, Neumann KH120
lilith93 is offline   Reply With Quote
Old 06-17-2020, 03:48 PM   #14
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

No, I don't... I 'm playing fast notes with 3 instances of Diva ("Dream Synth" category, "3EE Syupa So" patch) and the sustain pedal pressed. That makes up to 73% of total CPU (what a beast, my God), but there is no sign of xruns... It seems to be Wine-related. But, the thing is that the PCI card wasn't as prone to those sound drops as the USB ones.



Does Wine staging need a dedicated raise of RT priority in Rtirq? If so, how is it done?
Soli Deo Gloria is offline   Reply With Quote
Old 06-18-2020, 02:14 AM   #15
lilith93
Human being with feelings
 
lilith93's Avatar
 
Join Date: Apr 2018
Location: Karlsruhe
Posts: 486
Default

At least it seems to be possible:

https://wiki.winehq.org/Wine-Staging...ment_Variables
__________________
https://soundcloud.com/lilith_93
https://open.spotify.com/intl-de/art...SMSwCW9VkqAN9Q
MX Linux, Behringer UMC 204 HD, Neumann KH120
lilith93 is offline   Reply With Quote
Old 06-18-2020, 12:23 PM   #16
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Well, I reverted to the PCI card, but the xruns happen with it, too. But they're mainly related to Kontakt. I open a project with many instances of Synth 1 and other Win fxs and it behaves good. Maybe Wine in combination with disk streaming is not a good combo. What puzzles me is that Reaper's meters show plenty of overhead in terms of resources.



What I get with Kontakt are periodic realtime peaks. Even if I record at 128 latency, I get many interrupts even with the transport and metronome sound - it all shuts down for a moment -. But the used CPU resources are meager, so, there is some buggy aspect of Wine that is acting as a bottleneck here. Unfortunately, unless some wizard comes up with a magic recipe to allow Wine to perform reasonably well, I think I have reached the limit.


Anyway, leaving aside Kontakt and some other intensive effects such as Spline EQ, I have already reached my initial goal with Linux... A working MIDI/Audio environment, with many native options and light Win fxs running. I can keep the Win 7 dual boot for the heavy tasks, for now...
Soli Deo Gloria is offline   Reply With Quote
Old 06-18-2020, 12:25 PM   #17
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by lilith93 View Post

I can't say I really understand how to follow that page's guide...
Soli Deo Gloria is offline   Reply With Quote
Old 06-18-2020, 12:46 PM   #18
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

This guy has patched both Wine and the Kernel to get better real time performance with Wine. Looks very promising although it is in pretty early Alpha right now. The fact that he was able to do this in 3 weeks is pretty impressive.

Unfortunately, patching the kernel every time you switch kernels is kind of a deal breaker for me so I'm hoping there might be a way around this in the future. Not sure if he is on the forum here or not?

https://github.com/nine7nine/pkgbuilds_nspa
Klangfarben is offline   Reply With Quote
Old 06-18-2020, 04:24 PM   #19
Peevy
Human being with feelings
 
Peevy's Avatar
 
Join Date: May 2008
Location: Ireland
Posts: 552
Default

It looks like you've hit a bit of a wall with the combination of or at least one of your system or audio components. Many here have been able to run kontakt via linvst pretty successfully including myself. I've also got a ka6 interface & my latest project has about 16 instances of kontakt with other windows & linux plugins. Are you're samples running of an ssd, have you tried other distros?

Ive been using manjaro for almost 2 years now with the only problems coming from the odd buggy version of wine staging which i was able to roll back to a previous version. There's always a risk running win plugins on linux, which is why even though i do it myself i wouldn't really recommend it. If you can get away with only using native linux plugins that's definitely the way to go. Unfortunately some of my projects require high quality sampled instruments & there's very few available for linux.
__________________
System: Mobo-Asus Prime Z370P II, CPU-i7 8700K, RAM-64gb DDR4 3000mhz, GPU Nvidia 3060 OS: Manjaro Linux / Windows 11 / macos Soundcard: Motu 828ES Monitors: Adam A5X
Peevy is offline   Reply With Quote
Old 06-18-2020, 06:20 PM   #20
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Quote:
Originally Posted by Soli Deo Gloria View Post


Now, take a look at this :







Off topic. May I ask what theme is that you are using?
Thanks!
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 06-19-2020, 08:02 AM   #21
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by Klangfarben View Post
This guy has patched both Wine and the Kernel to get better real time performance with Wine.
https://github.com/nine7nine/pkgbuilds_nspa

Wow! I'll be taking a close look at that development! Something like that is badly needed... I 'll write to the guy to ask about it - from a first look at his Git page, I don 't understand at all how can it be tested -.


Quote:
Originally Posted by Peevy View Post
It looks like you've hit a bit of a wall with the combination of or at least one of your system or audio components. Many here have been able to run kontakt via linvst pretty successfully including myself. I've also got a ka6 interface & my latest project as about 16 instances of kontakt with other windows & linux plugins. Are you're samples running of an ssd, have you tried other distros?

I've been using manjaro for almost 2 years now with the only problems coming from the odd buggy version of wine staging which i was able to roll back to a previous version. There's always a risk running win plugins on linux, which is why even though i do it myself i wouldn't really recommend it. If you can get away with only using native linux plugins that's definitely the way to go. Unfortunately some of my projects require high quality sampled instruments & there's very few available for linux.

I tried to install the snapshot of AV Linux, but I had problems with it (something related to UEFI and the grub, I didn't understand completely), so I 've got that pending. Regarding other distros, I'm not too keen on distro hopping, mainly because I fear other environments will add an additional layer of complexity to what I 've already learned in Ubuntu. Nevertheless, I could give an opportunity to Manjaro at some point, as I've read good things about it.


If you don't mind, maybe I 'll write to you via private message, to ask a few things about your setup...


Quote:
Originally Posted by WyattRice View Post
Off topic. May I ask what theme is that you are using?
Thanks!

That theme is my own personal variation of the Default Commala 5 Theme. I've got it listed as "Default Commala 5 JRTheme", probably a variation itself that I downloaded at some point, but the color scheme is in many ways of my own. I also changed some icons to the Reaper v4 version ones, since they were visually more comfortable for my taste. If you're interested in it, I can obviously share it - I never did it because it's basically a personal tweak of the already great Commala one -. I liked Commala mainly because it derives from the official V4 theme, which is the only one I have ever liked, honestly. I don 't really like the V5 and V6 ones at all... And this theme is mostly all I need, with only a few missing things for my taste...
Soli Deo Gloria is offline   Reply With Quote
Old 06-21-2020, 09:20 AM   #22
lilith93
Human being with feelings
 
lilith93's Avatar
 
Join Date: Apr 2018
Location: Karlsruhe
Posts: 486
Default

Maybe have a look here:

https://www.kvraudio.com/forum/viewt...f=259&t=547831
__________________
https://soundcloud.com/lilith_93
https://open.spotify.com/intl-de/art...SMSwCW9VkqAN9Q
MX Linux, Behringer UMC 204 HD, Neumann KH120
lilith93 is offline   Reply With Quote
Old 06-22-2020, 05:52 AM   #23
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Thanks for pointing me to that bridge! I had seen it somewhere but somehow I didn't pay attention to it, since it seems to be rather new and there are not many comments about it on the web. I'll contact the dev and begin testing it...
Soli Deo Gloria is offline   Reply With Quote
Old 06-22-2020, 04:18 PM   #24
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Klangfarben View Post
This guy has patched both Wine and the Kernel to get better real time performance with Wine. Looks very promising although it is in pretty early Alpha right now. The fact that he was able to do this in 3 weeks is pretty impressive.
Hi, that's me. I noticed traffic from here to my github.

Honestly, it's not impressive at all, really. The performance problems with wine, especially for the proaudio case; have been known about for many years... There used to be some patches for getting around the worst of it - but they are incompatible with modern versions of Wine.

it's also not impressive, because most of my patchwork is already out there in the wild (Steam Proton uses some of it, for example). I just understand a few fundamental problems with wine, relating to our usecase - So i've snatched up stuff that i know will help... I suppose the only part that is impressive -- is that i have a working patch that actually implements PROCESS_PRIOCLASS_REALTIME mapped to linux RT priorities (not perfect yet/WIP, but I've never seen any implemenetation, beyond the patch that mine is based on.).

I'm also fairly familiar with linux and wine, in general. that all said, my background isn't computer science. (although, over the years I have contributed to numerous FOSS projects).

Quote:
Originally Posted by Klangfarben View Post
Unfortunately, patching the kernel every time you switch kernels is kind of a deal breaker for me so I'm hoping there might be a way around this in the future. Not sure if he is on the forum here or not?

https://github.com/nine7nine/pkgbuilds_nspa
There's currently no way around it. The futex-multiple-wait kernel patch has had one RFC / review on LKML -- recently, it's been rewritten and is being reviewed again... No timeline on when it makes it into mainline linux... You might be waiting a while, but yes - the hope is that upstream will merge the feature, eventually.

the kernel support is a hard requirement for my wine branch. you can't emulate / move system calls out of wineserver without it -- the poor performance of VSTs in wine, especially ones like NI kontakt, is due to wineserver being hammered by system calls and as it is single-threaded; that causes serious problems -- it's exactly why they often buckle, stutter and freeze under relatively low DSP load in Jack...

(the above is exactly "the wall" that the OP is hitting).

well, and the fact that wine schedules threads as SCHED_OTHER and threads largely aren't prioritized in any meaningful/useful way... -- your background wine task, for the most part gets as much cpu time as your VSTs important threads. even with wine-staging -- you can't actually prioritize all of the threads correctly (it catches some, but not all)... everything tends to be contended.

anyway, even if i get all of the kinks ironed out -- as i've noted on my github -- we need a re-implementation of one of my legacy patches, to get the kind of performance out of wine that is needed for some plugins... it's a bit beyond my current knowledge to re-implement, unfortunately.

and even if that was implemented -- sometimes, tricks are still needed to get the most out of wine. For example, a few years ago -- even with the most performant version of wine, I had 4 wineservers running, 2 of which were dedicated to just running 2 instances of Kontakt (or sometimes GuitarRig). while the other two, were for the rest of my plugins...

for most average users, something like this would be non-trivial to do. -- as it required multiple wine installations, winelib VST hosts rebuilt/linked against each wine installation. (to funnel the VSTs to the correct wineserver.).

anyway, my point is that it's very hard to get the performance out of wine needed to run heavy VSTs, especially if you plan to run lots of them.
nspa is offline   Reply With Quote
Old 06-23-2020, 06:55 AM   #25
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by nspa View Post
...the poor performance of VSTs in wine, especially ones like NI kontakt, is due to wineserver being hammered by system calls and as it is single-threaded; that causes serious problems -- it's exactly why they often buckle, stutter and freeze under relatively low DSP load in Jack...

(the above is exactly "the wall" that the OP is hitting).

Hi Nspa, and thanks for your detailed insights and work! It was clear from my observations, that as long as you require from Kontakt a little processing effort, something is fundamentally flawed regarding Wine. I see periodic overloads in Kontakt's cpu meter, even when playing relatively uncluttered passages, but those overloads are not reflected in Reaper's performance meter, which has plenty of overhead.


There is a number of success stories regarding Linux and Kontakt, but I don't know which instruments are favored by those users (if you want to clarify it in your case, Peevey, it will be interesting). Something like LASS, the legacy Berlin Woodwinds, or specially Cinesamples 'Abbey Road Pianos, bring wine to its knees from the beginning in my setup.


Fortunately, I have a good performance with other much lighter instruments. I am able to run without problem projects with many Synth 1 instances, the Valhalla plugins and other Win instruments/FXs without a noticeable effort, so that in itself is a success for me and enables my currrent work with Linux. There are already many quality instruments/FXs with Linux versions (Surge, Dexed, Helm and the likes), and I think it will be only a matter of time before we can run other heavy things without a hitch...



Quote:
Originally Posted by nspa View Post
for most average users, something like this would be non-trivial to do. -- as it required multiple wine installations, winelib VST hosts rebuilt/linked against each wine installation. (to funnel the VSTs to the correct wineserver.).


anyway, my point is that it's very hard to get the performance out of wine needed to run heavy VSTs, especially if you plan to run lots of them.

In conclusion, do you think I could test your development? Would it be useful for my usecase? Is it too esoteric of a setup, or I could try it out with your guide? I would like to be a beta tester, but only if the installation/tweaking of the system is reasonably viable for a newbie who dares to change different aspects of the system but is not a programmer himself.

Last edited by Soli Deo Gloria; 06-23-2020 at 07:16 AM.
Soli Deo Gloria is offline   Reply With Quote
Old 06-23-2020, 07:33 AM   #26
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

A question that pops into my mind on the subject of higher priority WINE.

If you increase WINE's priority to be RT, does that not steal CPU clock cycles that REAPER running in Linux would have gotten and used, and if so would that not ding the performance of REAPER itself?
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 06-23-2020, 07:56 AM   #27
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Well, Glennbo, I assume you're asking the question to Nspa. Anyway, from my experience so far, I can see that Reaper has plenty (and I mean plenty) of resources available - as far as the Performance Meter shows - when I bring the system to its knees with a single Kontakt instance.

You're probably right in your reasoning, but the problem, I guess, is the profound unbalance between Reaper's available resources and Wine's struggles with a single Kontakt process. That's where Nspa's development is pointing out, I think.
Soli Deo Gloria is offline   Reply With Quote
Old 06-23-2020, 08:10 AM   #28
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Hi Nspa, and thanks for your detailed insights and work! It was clear from my observations, that as long as you require from Kontakt a little processing effort, something is fundamentally flawed regarding Wine. I see periodic overloads in Kontakt's cpu meter, even when playing relatively uncluttered passages, but those overloads are not reflected in Reaper's performance meter, which has plenty of overhead.
you are trying to run kontakt in a build of wine that has no real synchronization, nor is it setting RT priorities properly. All of those spikes you see are due to that... don't get me wrong, kontakt is a beast and will still use high cpu / dsp, depending on what you have loaded, but those crazy spikes aren't present in my spin of wine.


Quote:
Originally Posted by Soli Deo Gloria View Post
There is a number of success stories regarding Linux and Kontakt, but I don't know which instruments are favored by those users (if you want to clarify it in your case, Peevey, it will be interesting). Something like LASS, the legacy Berlin Woodwinds, or specially Cinesamples 'Abbey Road Pianos, bring wine to its knees from the beginning in my setup.
a lot of those people aren't doing anything super crazy with kontakt. kontakt has plenty of lite instruments, but if you start getting into abbey roads, the giant, etc -- it's another story.

I often have kontakt loaded right up. abbey roads drums, scarbee, the giant, strings, etc -- all on key splits, on one midi channel. heavily stacked multi-instruments - so triggering lots of voices/instruments all at once (live playing)... Reaktor is often thrown into the mix too (it also can be quite heavy). this simply does not work on vanilla wine or staging.

Quote:
Originally Posted by Soli Deo Gloria View Post
Fortunately, I have a good performance with other much lighter instruments. I am able to run without problem projects with many Synth 1 instances, the Valhalla plugins and other Win instruments/FXs without a noticeable effort, so that in itself is a success for me and enables my currrent work with Linux. There are already many quality instruments/FXs with Linux versions (Surge, Dexed, Helm and the likes), and I think it will be only a matter of time before we can run other heavy things without a hitch...
yeah, many lite vsts just aren't heavily multi-threaded and don't put so much pressure on wine.

Quote:
Originally Posted by Soli Deo Gloria View Post
In conclusion, do you think I could test your development? Would it be useful for my usecase? Is it too esoteric of a setup, or I could try it out with your guide? I would like to be a beta tester, but only if the installation/tweaking of the system is reasonably viable for a newbie who dares to change different aspects of the system but is not a programmer himself.
Well, my github provides no guide, beyond a few notes on setting environment variables for my build features.

The reason for this is pretty simple - I'm only a month in, hacking on wine. the other thing is; they are Archlinux packages -- anyone on Arch or an arch-based distro; can simply clone the repo, cd into the package directories, then execute 'makepkg -si' -- it then builds and installs like any other package.

I can't really provide packages for other distros. I'm an Arch lifer (11 years in) and I don't have any time or desire to maintain packages for other distro... most of my efforts here, are for my own use -- but I also know that others may want to use my patchwork -- so I'm sharing it.

it may be a bit advanced as a newbie for you to put together -- but for anyone who can build packages, patch sources, etc -- it's really not hard. my Archlinux's source packages show exactly how I'm building wine-nspa and linux-nspa -- it also shows exactly what patches are applied and in what order, even all of the commands used. (because pkgbuilds are just glorified shell scripts, essentially.).

I think you would need to wait until some brave soul packages it for your distro, unfortunately.
nspa is offline   Reply With Quote
Old 06-23-2020, 08:26 AM   #29
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Glennbo View Post
A question that pops into my mind on the subject of higher priority WINE.

If you increase WINE's priority to be RT, does that not steal CPU clock cycles that REAPER running in Linux would have gotten and used, and if so would that not ding the performance of REAPER itself?
No, not really. Reaper's critical threads are affected just like Kontakt.

my patchset rewires wine itself -- all PROCESS_PRIOCLASS_REALTIME process threads or THREAD_PRIORITY_TIME_CRITICAL threads within wine or apps running in wine are grabbed and re-prioritized, same goes for any of the fsync threads (used for synchronization) that are intended for RT... I hook all of these things.

So it's not a matter of kontakt stealing from Reaper - in Reaper, you would just set the buffering threads to THREAD_PRIORITY_TIME_CRITICAL... Reaper and the VSTs benefit from having better synchronization + their critical threads handled by wine-nspa.

Last edited by nspa; 06-23-2020 at 08:34 AM.
nspa is offline   Reply With Quote
Old 06-23-2020, 08:47 AM   #30
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

Over my head. Thanks for explaining it. I only use Kontakt with it's stock library in a supporting role to audio tracks, and use it without any issues the exact same way as I used it in Windows.

I just assumed there is a finite amount of CPU power, and that two real time processes might fight each other for CPU time. I suppose how powerful of a CPU would factor in too.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 06-23-2020, 09:13 AM   #31
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by nspa View Post
I think you would need to wait until some brave soul packages it for your distro, unfortunately.

Hmmm, I see... But, what about Manjaro? Is it viable with it? I 've read that it is indeed some kind of "newbie-friendly" Arch, to put it in simple words (well, if the term "newbie-friendly" could be really applied to any Linux environment up to this point, which I seriously doubt). If it could enable to run all the Komplete goodies on it, I could eventually dual-boot with it...
Soli Deo Gloria is offline   Reply With Quote
Old 06-23-2020, 09:57 AM   #32
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Hmmm, I see... But, what about Manjaro? Is it viable with it? I 've read that it is indeed some kind of "newbie-friendly" Arch, to put it in simple words (well, if the term "newbie-friendly" could be really applied to any Linux environment up to this point, which I seriously doubt). If it could enable to run all the Komplete goodies on it, I could eventually dual-boot with it...
yes, i suspect my packages work fine with Manjaro. it's arch-based and as long as it's developers haven't done anything stupid with linux or wine packaging -- it should install fine... someone would just need to verify that and tell me, as i only test with Archlinux 'proper'.

yeah, no distros are newbie friendly, at least not for proaudio. lol.
nspa is offline   Reply With Quote
Old 06-23-2020, 10:03 AM   #33
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

Quote:
Originally Posted by nspa View Post
my patchset rewires wine itself -- all PROCESS_PRIOCLASS_REALTIME process threads or THREAD_PRIORITY_TIME_CRITICAL threads within wine or apps running in wine are grabbed and re-prioritized, same goes for any of the fsync threads (used for synchronization) that are intended for RT... I hook all of these things.

So it's not a matter of kontakt stealing from Reaper - in Reaper, you would just set the buffering threads to THREAD_PRIORITY_TIME_CRITICAL... Reaper and the VSTs benefit from having better synchronization + their critical threads handled by wine-nspa.
I also wanted to thank you for such great information and for the work you are putting in. I had a couple questions if you have the time to answer.

First, I know you are only about a month into this, but from what you've done so far and been able to accomplish, what would you say the prognosis is for getting similar/on par performance with Kontakt on Windows in Linux?

Second, I'm using Manjaro. Obviously not the same as Arch, but does have full access to the AUR. Once you have this in a semi-ready for public consumption state, do you have any plans to put this up on AUR or are you just going to stick to your github?

Again, thanks so much for what you are doing. I know you pretty much consider this a hack right now, but for those of us trying to migrate over to Linux full time, this is a really big deal. A lot of plugins I can live without but there just isn't a replacement for Kontakt and the library content.
Klangfarben is offline   Reply With Quote
Old 06-23-2020, 10:06 AM   #34
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Glennbo View Post
Over my head. Thanks for explaining it. I only use Kontakt with it's stock library in a supporting role to audio tracks, and use it without any issues the exact same way as I used it in Windows.

I just assumed there is a finite amount of CPU power, and that two real time processes might fight each other for CPU time. I suppose how powerful of a CPU would factor in too.
yeah, it doesn't sound like you are doing heavy lifting with Kontakt. glad it works for you, as you like to use it.

sorry for the technical explanation. it's hard to explain in layman terms... yes, finite resources -- but a system that is setup properly is going to have everything prioritized correctly, wine-nspa attempts to handle wine's threading, synchronization and RT priorities correctly...

for example, on my own system - wine's highest priority threads run just below Jack. so they are very high priority, but lower than Jack's audio callback threads -- this way they don't interrupt audio, but they still get lots of CPU time and are prioritized above most RT threads on my linux system. (minus, audio device and some kernel threads that run at 99 RT priority)... so just like Jack's audio threads don't get interrupted by wine's RT threads -- my system doesn't interfere with wine's RT threads.

this all takes a bit of engineering / planning.
nspa is offline   Reply With Quote
Old 06-23-2020, 03:24 PM   #35
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by Klangfarben View Post
I also wanted to thank you for such great information and for the work you are putting in. I had a couple questions if you have the time to answer.

First, I know you are only about a month into this, but from what you've done so far and been able to accomplish, what would you say the prognosis is for getting similar/on par performance with Kontakt on Windows in Linux?
Well, I'm a month in -- but with prior dealing with these sorts of issues with wine / proaudio.

My own expectation is to dramatically improve performance in Wine, and yes, for Kontakt too. As to whether or not it's possible to achieve Windows level performance? I would say that's unlikely. The reasons for that are complicated - after all, we are running this software in a non-native environment and we don't have NT kernel. Wine can't do things like wait-on-multiple-objects - that would require that Wineserver was multi-threaded. So there are technical challenges here. some are not easy to solve (far beyond my abilities).

regardless of that, it's still possible to get reasonable performance. I think once I get the threading / priorities all worked out (i kind of had a breakthrough, lastnight. but still a few todo's), then I can move onto other things; like setting priorities from within ntdll, rather than wineserver (which causes xruns, afaict)... and i can start looking at other optimizations - like moving certain calls out of wineserver (that hurt performance) and other things... So i believe that there is lots of room for performance improvements.


Quote:
Originally Posted by Klangfarben View Post
Second, I'm using Manjaro. Obviously not the same as Arch, but does have full access to the AUR. Once you have this in a semi-ready for public consumption state, do you have any plans to put this up on AUR or are you just going to stick to your github?

Again, thanks so much for what you are doing. I know you pretty much consider this a hack right now, but for those of us trying to migrate over to Linux full time, this is a really big deal. A lot of plugins I can live without but there just isn't a replacement for Kontakt and the library content.
Yeah, i very well might maintain packages on the AUR (I used to maintain AUR packages, for several years; custom kernel packages, nvidia driver and some other RT related goodies from RedHat)... But that would be after I feel that I've gotten things to where I want to, at least in terms of more broad consumption... Currently, I'm still experimenting, so it's not there yet / for AUR...

Yes, it's a series of hacks - as I slowly pull together something viable. I'm making fairly steady progress though. But there is a steep learning curve to much of what I am working on... and as someone who is not a software engineer - that makes it even harder, as I'm sure you can imagine.

Thankfully, a couple of folks from codeweavers have been helpful (devs I've contacted about their code, that I'm modified, or used parts of) and if I get into a pinch -- the wine-devel mailing list has always been a friendly place for me. help is usually pretty good. lots of talented software engineers lurk on that list, even if not upstream wine developers.

and yes, I can't live without Kontakt, either. or NI stuff, in general. Aside from AAS Lounge Lizard EP-4 (best electric piano VST, imho), I use NI almost exclusively. hence why I am hacking wine. lol... so yes, i understand where you are coming from.

as an aside, after a few year hiatus from this kind of thing - i find it both hilarious and sad that so many linuxaudio devs have put so much work into VST bridges and integration with Wine -- yet none have bothered with trying to fix the real problems with wine's performance. it's crazy. i don't get it.
nspa is offline   Reply With Quote
Old 06-23-2020, 07:35 PM   #36
osxmidi
Human being with feelings
 
Join Date: Feb 2014
Posts: 620
Default

Well, I think wine needs a lot done to it.

d2d1 is one of them and xembed is another.

Also threads and futexes.

There is Wine Staging esync and Wine Staging tkg https://github.com/Kron4ek/Wine-Builds/releases with wineserver mods but I couldn't notice that much difference, maybe a 5% difference or something like that.

I think it should have been done by now by the main Wine devs that understand the Wine internals and work with them everyday, and Wine Staging esync was done by the main Wine staging dev.

But, if someone else understands the Wine internals, then go for it.

There is also an instance problem with Wine where more instances slow performance and that's probably Wines thread priorities etc.

Also believe it or not, The gpu/drivers can have an effect on Wines performance and Wines video diplay can drag down performance on older cards like on my old core 2 testing laptop for instance.

I was testing Kontakt (on my i7 system) with a large Piano library that I forget the name of and it was spiking to 100% in a periodic sort of way and it turned out that my system rt priorities were not setup and after that the spiking stopped.

Also, what are the cpus that are being used,

An i7 is a different case to a Core Duo.

When the cpu load starts hitting around say 40% then it might interfere with the audio buffer filling speed and therefore spikes and xruns and stuttering might occur.

Last edited by osxmidi; 06-23-2020 at 07:53 PM.
osxmidi is offline   Reply With Quote
Old 06-24-2020, 06:45 AM   #37
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
Default

Quote:
Originally Posted by osxmidi View Post
...I was testing Kontakt (on my i7 system) with a large Piano library that I forget the name of and it was spiking to 100% in a periodic sort of way...
This is exactly my situation with an I7-3770k from 2013, which I have loaded with 40+ Kontakt track projects many times on Windows 7, with hundreds of FXs. While being a relatively "old" machine for the current standards in the US and Europe (it's always strange to me that in this computational world, "old" can be applied to such short periods of time), I see in Reaper's performance meter that I have many, many resources available but the spikes do occur the same in that periodic fashion you observe with Wine. Up to now, I have been bridging everything with Linvst, but I agree that the real bottleneck seems to be Wine.




Quote:
Originally Posted by nspa View Post
regardless of that, it's still possible to get reasonable performance. I think once I get the threading / priorities all worked out (i kind of had a breakthrough, lastnight. but still a few todo's), then I can move onto other things; like setting priorities from within ntdll, rather than wineserver (which causes xruns, afaict)... and i can start looking at other optimizations - like moving certain calls out of wineserver (that hurt performance) and other things... So i believe that there is lots of room for performance improvements.


Well, I'll be taking a look at Manjaro, and see if I can install it and get used to its basics alongside my current Ubuntu Studio install (with which I already feel comfortable). If I see that it's viable to have both systems installed on my main machine, I'd like to beta-test your development, really. In that case, if you don't mind, I'll go on via private message. As time goes by, if things turn out well, all the experience gained with all of this will be reflected in the first posts of this thread, which I plan as a kind of easy (well, "easy") summary of Linux audio optimizations.



Quote:
Originally Posted by nspa View Post
as an aside, after a few year hiatus from this kind of thing - i find it both hilarious and sad that so many linuxaudio devs have put so much work into VST bridges and integration with Wine -- yet none have bothered with trying to fix the real problems with wine's performance. it's crazy. i don't get it.

I agree, and as osxmidi comments, wine devs have strangely missed the focus on this most important topic. Besides, there is a serious, underlying problem with Linux : almost 30 years onwards from its conception, there still seems to be a certain - unconscious? - delight in difficulty just for the sake of it. It always puzzles me that for every simple question on Linux forums, you find on many occasions a hard time finding a straightforward solution. The console-centric paradigm seems to be some kind of - unconscious? - gate-keeping to keep "forever" things as they are : a little, little niche in the desktop computing world. Forgive me about this, but although many technical explanations can be given about Linux's ways, I always get the gate-keeping impression in the end. After all, Linux rules the world with Internet servers, supercomputers and even somehow via Android on the smartphone realm. So, let them keep the desktop field private, to put it somehow...



Maybe in the future, as more and more newbies like me keep entering, little by little, there is a tiny, almost microscopic hope of a really friendly Linux environment. If they iron out all the bugs of Snap and the likes, maybe it will also be a step in that direction. But, in my case, as I profoundly dislike the direction Microsoft is taking with Windows 10, here I am... Apple is not an option for me here in Argentina, and I don't really expect a truly easy Linux experience, at least in my lifetime. Nevertheless, here comes my support to the Linux project, always reckoning that things could - and should - be way, way easier.



Sorry for the rant mode; it was a little relief after all these geeky times with Ubuntu Studio. Now, let's continue working...

Last edited by Soli Deo Gloria; 06-24-2020 at 06:57 AM.
Soli Deo Gloria is offline   Reply With Quote
Old 06-24-2020, 09:09 AM   #38
nspa
Human being with feelings
 
Join Date: Jun 2020
Posts: 14
Default

Quote:
Originally Posted by osxmidi View Post
Well, I think wine needs a lot done to it.

d2d1 is one of them and xembed is another.

Also threads and futexes.
there's a patch floating around for xembed. my build uses futexes and pi_futexes. that's what fsync is.

Quote:
Originally Posted by osxmidi View Post
There is Wine Staging esync and Wine Staging tkg https://github.com/Kron4ek/Wine-Builds/releases with wineserver mods but I couldn't notice that much difference, maybe a 5% difference or something like that.
esync leaks resources with some apps - you can exhaust file descriptors on your system, it's untenable. It's exactly why i am using fsync (it doesn't have that problem and it's faster)... It's also why i have code that allows the fsync threads to be RT - as that makes a big difference in performance / stability.

I've seen that git repo - nothing of interest for me in there.

Quote:
Originally Posted by osxmidi View Post
I think it should have been done by now by the main Wine devs that understand the Wine internals and work with them everyday, and Wine Staging esync was done by the main Wine staging dev.

But, if someone else understands the Wine internals, then go for it.
Yeah, he works for codeweavers. I've been in direct contact with him, recently.

Code doesn't write itself - wine is tricky and i think your expectations of wine developers and codeweavers is unrealistic.

Quote:
Originally Posted by osxmidi View Post
There is also an instance problem with Wine where more instances slow performance and that's probably Wines thread priorities etc.
I've explained why this is, in this thread already.

Quote:
Originally Posted by osxmidi View Post
Also believe it or not, The gpu/drivers can have an effect on Wines performance and Wines video diplay can drag down performance on older cards like on my old core 2 testing laptop for instance.
who cares? lol.

Quote:
Originally Posted by osxmidi View Post
I was testing Kontakt (on my i7 system) with a large Piano library that I forget the name of and it was spiking to 100% in a periodic sort of way and it turned out that my system rt priorities were not setup and after that the spiking stopped.

Also, what are the cpus that are being used,

An i7 is a different case to a Core Duo.
It sounds like you might be talking about The Giant Piano Library.

I don't get spikes like that. That's a synchronization and thread priority issue -- and you didn't push Kontakt hard enough to determine that using the staging RT patch actually fixed the problem (hint: it doesn't, not under any real load. that patch doesn't set the correct threads as RT - Kontakt's high priority threads run as SCHED_OTHER, so it's no surprise that it runs badly, under those conditions). Running one instrument doesn't say much, does it? try running heavy multi-instruments, then get back to me.

my system is an AMD Ryzen 5 3500U (Lenevo IdeaPad 14 2-in-1). modest CPU, just a mobile quadcore. nothing fancy. The only fancy part is that I upgraded the M.2 SSD + RAM... my audio interface is a ZOOM U-44 (also nothing fancy).

Quote:
Originally Posted by osxmidi View Post
When the cpu load starts hitting around say 40% then it might interfere with the audio buffer filling speed and therefore spikes and xruns and stuttering might occur.
nah. I can run Kontakt with heavy multi-instruments and i won't get xruns until > 90% DSP load in Jack... You shouldn't be getting xruns in any situation with 40% utilization, at least not with any native linuxaudio apps and not with a proper build of wine, either. (assuming your system is actually configured properly)

Currently, the only time i get xruns is when i first launch some VSTs (fairly normal) and just after startup -- but I'm fairly certain why that is. I should avoid setting RT priorities from wineserver. As i've observed my apps threading in htop and that seems to be the issue. -- I think once I resolve that - I won't see those xruns anymore.

Last edited by nspa; 06-24-2020 at 09:17 AM.
nspa is offline   Reply With Quote
Old 06-24-2020, 09:25 AM   #39
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Besides, there is a serious, underlying problem with Linux : almost 30 years onwards from its conception, there still seems to be a certain - unconscious? - delight in difficulty just for the sake of it. It always puzzles me that for every simple question on Linux forums, you find on many occasions a hard time finding a straightforward solution. The console-centric paradigm seems to be some kind of - unconscious? - gate-keeping to keep "forever" things as they are : a little, little niche in the desktop computing world.
It does seem that way to me too sometimes, but my perspective has changed after using it for a while. The sheer number of distros alone points toward why it's different from other OSes.

Console/terminal is the most basic and common way to do things among all distros. Because of that, providing advice which involves using terminal commands makes the most sense...in a way. It's more likely that the results will be achieved without having to ask more questions such as "what file manager are you using" and then explaining what options need to be enabled, all the steps involved in changing ownership of files (and so on). For that matter people use different software/package managers. Looking at Ubuntu and its official variants (20.04) is a good example: their own "Ubuntu Software" app has been removed and now in its place is "Snap Store" which tries to force Snap versions and obscure the source of packages. So I understand why all the apparent love for terminal, even though my general opinion is "clicking is better than typing". I take the advice which is given as terminal commands, then learn what those commands are/what they do, and proceed as I decide (sometimes opening a sudo version of a graphical text editor...GASP!!!)

Then there's the thought of what Linux is. This isn't something that's maintained by a single company. A lot of the code is coming from volunteers around the globe who have varying opinions of what Linux should be. Expecting that Linux in general is going to "just" become something like Windows would mean a more closed development approach with a narrower focus. I expect it's possible for a certain distro to become like this, but even so the maintainer would need to be willing to take the time to sculpt something that's very "open" into something very comprehensively focused. I'd assume by that point it wouldn't be "Linux" anymore, perhaps more like MacOS in a sense.

These things (and probably more) tend to make Linux a different kind of OS.
JamesPeters is offline   Reply With Quote
Old 06-24-2020, 11:27 AM   #40
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
Default

Quote:
Originally Posted by JamesPeters View Post
I take the advice which is given as terminal commands, then learn what those commands are/what they do, and proceed as I decide (sometimes opening a sudo version of a graphical text editor...GASP!!!)
Hehe, I setup a hot key for "God Mode" GUI based file browsing.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.