05-25-2020, 07:30 AM | #1 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Time Critical value in Ubuntu Studio
Continuing from a derived discussion in the "Some crashes with Ubuntu Studio" thread I started recently - and for the sake of having the info on this topic more easily available, as I think it could be of importance for newbie users like me - , I'd like to ask the seasoned users something about the time critical value one sees when starting Reaper from the terminal :
jack: setting TIME CRITICAL=4 In my case, the reported value is 4, while I see that other users report 74 as the default value. What am I missing here? My rtprio setting in /etc/security/limits.d/audio.conf is 95, and I tried setting Qjackctl real-time priority to 80, as 4duhwinnn commented in the other thread. Anyway, the shown value for time critical differs vastly in my case (unless there was some kind of bug and "4" means "74" in this context, with the 7 omitted, but that would be too bizarre to even consider it). Just in case, my audio.conf file settings are these : @audio - rtprio 95 @audio - memlock unlimited #@audio - nice -19 Any hint about this? Should I worry about it or just ignore it? Thanks in advance. Last edited by Soli Deo Gloria; 05-31-2020 at 07:58 AM. |
05-26-2020, 01:44 PM | #2 |
Human being with feelings
Join Date: Sep 2018
Location: Colorado
Posts: 429
|
Linux real-time process priority you can read it here:https://stackoverflow.com/questions/...ority-in-linux this is what they are talking about... IMO
|
05-26-2020, 06:23 PM | #3 |
Human being with feelings
Join Date: Mar 2017
Posts: 859
|
I don't think 74 was a default value, maybe a coincidence?
Anyway, I have an maudio 2496 pci soundcard, and these are my .jackdrc settings, for comparison: /usr/bin/jackd -P80 -dalsa -r44100 -p256 -n2 -D -Chw:M2496 -Phw:M2496 The linux U-he synth/effects downloads are in the first post here: https://www.kvraudio.com/forum/viewt...f=292&t=538894 I suggest use Diva synth to test, pick a preset heavy on cpu, use it on your current settings, play fast, press sustain pedal etc, trying to crush the cpu, then do same test a few times with other quite different settings, and see if conclusions can be drawn. (the U-he archives when open have an install script that creates a .u-he folder in /home/you, containing the plugin and it's presets, fonts etc, and a u-he folder in /home/you/.vst with links from the plugin you installed.) Cheers |
05-27-2020, 08:46 AM | #4 | ||
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Thanks for the replies, s wave and 4duhwinnn!
Quote:
Quote:
Well, my jackdrc settings were : /usr/bin/jackd -dalsa -dhw:K6 -r48000 -p128 -n3 So I added the -P80 of your settings, but it doesn't seem to make any difference in the performance. Regarding Diva, I installed the demo and played fast, pedal-sustained notes with the 3EE_Syupa So patch from the default Dream Synth bank, which seems heavy enough for test purposes. I also bent the pitch like crazy while doing so. My CPU usage reaches 9.15%, which, for my taste, is extremely high for a single synth passage, but good enough in terms of what I've read about this instrument, I think. No glitches are discernible, apart from the demo ones after two minutes. You'l l say if this is a good performance or not with an I7 3770K machine from 2013, with 32 Gbs of RAM and SSDs. Needless to say, the idea is to set once and forget all about this, really. I'm just assuring that I'm alright with the basic setup (and learning the basics of Linux audio). I asked about this mainly because the different value in my terminal seemed intriguing , and I wanted to check if everything was fine here. The difference is still there (TIME CRITICAL = 4), but if there's no performance problem, I suppose I can forget about it... |
||
05-27-2020, 09:29 AM | #5 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
ulimit -a in your terminal window that you are launching REAPER from. Look for the real-time priority line. Mine says the following, real-time priority (-r) 98 and when I was using a pair of M-Audio PCI based cards adding the -P80 made night and day difference for me. I no longer use JACK though, and have also since switched to an external USB interface, so in REAPER I'm using ALSA now. |
|
05-28-2020, 08:29 PM | #6 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, according to the ulimit command, the rt priority is 95. So, that marks the end of the question, I guess. The -P80 setting didn't seem to make any difference, but I'm seeing good results regarding CPU usage (more or less like Windows, I 'd say. Now, the only problem occurs with Kontakt and some stutter when I play live with it, most probably from disk streaming... but that will need a dedicated thread.
|
05-29-2020, 05:35 AM | #7 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Just to be sure, also type Groups in the Terminal, results should say "audio" also.
If not, then: sudo groupadd audio And we want your user in there also: sudo usermod -a -G audio $USER If you are not, then i don't think you are allowed to do any prio/mem'magic ? reboot is required also And i am using ALSA only, much simpler life and, when i tried Ubuntu Studio 20.10 (Groovy Gorilla) Daily Build, i used Studio Controls to actually turn everything off, Jack, MIDI, Pulse, all of it! and all my issues with ALSA was/is gone, just saying
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 05-29-2020 at 05:46 AM. |
05-29-2020, 07:23 PM | #8 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
hmm,
etc/security/limits.conf is the one i am editing, if that is any diff? i see and hear a clear difference with only: etc/security/limits.conf # audio group @audio - rtprio 95 @audio - memlock unlimited And i'm doing OK, guess i might have improvements to collect also And i don't have Studio Controls, Performance knobs, so i do: echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor and if you wanna see the freq/MHz, then watch -n 1 "cat /proc/cpuinfo | grep "^[c]pu MHz"" And on KDE, i dissable power management "battery and brightness" manually, not measured the difference, just a tip i got, might be a good idea, so, SmajjL obeys
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 05-29-2020 at 07:29 PM. |
05-30-2020, 11:01 PM | #9 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, my /etc/security/limits.conf file has this inside :
# /etc/security/limits.conf # #Each line describes a limit for a user in the form: # #<domain> <type> <item> <value> # #Where: #<domain> can be: # - a user name # - a group name, with @group syntax # - the wildcard *, for default entry # - the wildcard %, can be also used with %group syntax, # for maxlogin limit # - NOTE: group and wildcard limits are not applied to root. # To apply a limit to the root user, <domain> must be # the literal username root. # #<type> can have the two values: # - "soft" for enforcing the soft limits # - "hard" for enforcing hard limits # #<item> can be one of the following: # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open file descriptors # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit (KB) # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to values: [-20, 19] # - rtprio - max realtime priority # - chroot - change root to directory (Debian-specific) # #<domain> <type> <item> <value> # #* soft core 0 #root hard core 100000 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #ftp - chroot /ftp #@student - maxlogins 4 # End of file And the Freq/Mhz command shows this : Every 1.0s: cat /proc/cpui... grep: MHz: No such file or directory I don't know if you can infere anything from these results... |
05-31-2020, 05:55 AM | #10 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Ahh, I see text with # before it i assume does nothing on purpose (place holder info) but @ will, so for example, # audio group is just info/practical to read, here, after editing, the end would look like:
#* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 # audio group @audio - rtprio 95 @audio - memlock unlimited # End of file -- The, watch -n 1 "cat /proc/cpuinfo | grep "^[c]pu MHz"" is just bonus info for you, good party trick to know and.. i can say, you are not crazy, i have had that result myself, one time You can close it and try again, but this time, using CTRL+ALT + T Or, search your menu for Terminal/Console try again, not sure why atm hmm, hope it is not an Arch/Manjaro only thing, hmm, just bonus info anyway
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 05-31-2020 at 06:20 AM. |
05-31-2020, 06:36 AM | #11 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
@glennbo - rtprio 98 @glennbo - memlock unlimited I suppose a user would inherit settings from the group they are part of, and yes the "#" symbol comments lines from being executed. |
|
05-31-2020, 06:57 AM | #12 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
That would work also but i'm thinking now, is maby your way safer from a security aspect, or nah? (our glennbo is veeeery security thinker) beeing in a audio group is "just fine" also? I've just thrown myself into the audio group with, sudo usermod -a -G audio $USER (that would be me) I will try 98 also (because i can)
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
|
05-31-2020, 07:00 AM | #13 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Those values appear in my /etc/security/limits.d/audio.conf file. Is that Ok? Could I edit them and change @audio for @<myusername>? Or should I add those edited values to /etc/security/limits.conf which, as both of you comment, is prevented from executing anything?
Last edited by Soli Deo Gloria; 05-31-2020 at 08:00 AM. |
05-31-2020, 07:03 AM | #14 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Hehe, all the ha><ors out there are now scheming to become members of your audio group so they can have all the memory and speed they need! |
|
05-31-2020, 07:09 AM | #15 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
LoL, i'm not that! paranoid but yeah, i will do it like Jack&Glenn next round/lap
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
|
05-31-2020, 07:17 AM | #16 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
the "jack: setting TIME_CRITICAL = " value is what is returned by jack_client_real_time_priority() minus 1. So that's the realtime priority that JACK is configured to use (sounds like you have it configured to 5).
|
05-31-2020, 07:22 AM | #17 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
But either way, you would edit it the same way, depending if you are added to the audio group or do it like glennbo, both ways can work and i will try glennbo's way myself next time Sorry for the noise if you need a straight answer both ways can work and i am sure my way will work, but if audio.conf works with the way Glennbo is doing it, why not?
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
|
05-31-2020, 08:13 AM | #18 | |||
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
That's a joke, isn't it? Is it that easy to intrude a machine, simply with a <usrnm>? Quote:
Hmm, thanks for the tip, Justin! I'll have to take another look at Jack's settings. I simply thought that Ubuntu Studio had all pre-configured in the best way, but I could have changed something, without realizing, along the way. Quote:
No, thank all of you for the feedback! My first goals are more than achieved with Linux - a nice, secure environment for all the daily tasks and most of musical duties -. The fine-tuning I'm trying to achieve now, is mostly headed to see if I can fully use Komplete 10 in my Linux setup. Seeing other users' success stories around encourages me to pursuit that goal. |
|||
05-31-2020, 08:16 AM | #19 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
As for more bonus info (on your free time only)
Since i seem to stick with Manjaro's ways/workflow i found this guy. This is the world of Linux/Audio/Manjaro how you can do things there and i think he did a good job demonstrating and i think he is abit more than a whitebelt penguin
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 05-31-2020 at 08:24 AM. |
05-31-2020, 08:23 AM | #20 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Yes. Just having a little fun since SmajjL brought up the security aspect. That said, it very likely is safer to elevate the privileges of an individual, rather than of a group, just like you would do with other admin privileges.
|
05-31-2020, 08:44 AM | #21 | |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Thanks! Yes, I know the guy : "Unfa". He is very active in Youtube. If I end up in Manjaro at any time (who knows; nothing can be ruled out), his tutorials will be a reference, for sure. Well, I take note, man... |
|
05-31-2020, 08:44 AM | #22 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
Yep *MF'er#* Yep on the security logic also even if you are safe the other way, also, we might have safe>safer>safe'iest>forth knox kinda thing, i'm ok with (safer) no need to overdo it The practice: "just don't give out your phonenumber still applies on Linux also i would think, so i won't
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
|
05-31-2020, 08:50 AM | #23 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
Great! it is useful Linux info he has on his channel also, i don't think you can beat me in distrohopping, but you can try hehe
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
|
05-31-2020, 09:00 AM | #24 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
|
|
06-01-2020, 12:03 AM | #25 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Right! trying Mx Linux
So without editing anything, the command ulimit -a first said: max locked memory (kbytes, -l) 64 real-time priority (-r) 0 After manualy creating a new (empty) audio.conf in /etc/security/limits.d/ @SmajjL - rtprio 98 @SmajjL - memlock unlimited and reboot, and ulimit -a will this time say: max locked memory (kbytes, -l) unlimited real-time priority (-r) 98 So, no adding to group and that was the only text, just this worked
__________________
_Ohh.))::_Linux_::((.Xoxo_ |
06-01-2020, 12:06 AM | #26 | |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
Quote:
I know you are not kidding either The IP-table thing i think i need to learn, maby some other smaller things, but that's it! You're an ex-marine or something? Hmm, and why unlimited and not the size of the memory one have installed? Because unlimited equals the max one have automagically? ok.. *wild guess* iiii dunno *me hides*
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 06-01-2020 at 12:33 AM. |
|
06-01-2020, 06:44 AM | #27 | |||
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Quote:
Quote:
Last edited by Glennbo; 06-01-2020 at 06:52 AM. |
|||
06-01-2020, 08:00 AM | #28 |
Human being with feelings
Join Date: Nov 2013
Location: IKEA
Posts: 2,778
|
GUFW i know and by the surface only, and i have got used to just install it and turn it on, set & forget... lol *me ducks*
Default Profile is Home, so, it is Home and i am Home and only Public and Office is there, never seen gaming or MythTV, what the?.. ahh.. ... i typed iptables in the Terminal, so it is a baked in thing, it is there, GUFW is just a graphical easy'er control thing and iptables would still be in there even if i did not install GUFW? ohh Ah, ok.. (i've been lucky or, not unlucky ) i thought it was your hobby sort of so that you setup your thing, and then go to your other computer and try to hack yourself, if you can't then only then are you satisfied. I think Soli is trying Kontakt with large librarys, not sure if anyone want anything chewing on Swap while playing, even if it is SSD tech, iii dunno I think we have irq-stuff also to try, forgot that tip. Okej, i am now on Ubuntu Studio 20.10 ("Tales of the Golden Monkey") daily, and eum, straight out of the box, everything works here i must say! and look at that, they Do, put the audio.conf in the /etc/security/limits.d/ From the future, here is what it looks like: # Provided by the jackd package. # # Changes to this file will be preserved. # # If you want to enable/disable realtime permissions, run # # dpkg-reconfigure -p high jackd @audio - rtprio 95 @audio - memlock unlimited #@audio - nice -19 Finaly, now i know how disable realtime if i would need that, but all is perfect so, who-ho! Edit/cleaned: i'll report myself for smile abuse next time == Ofc.. problems getting a working WINE, had to go through PlayOnLinux, then Native Access could not reach internet (that's a new one..) Back to Manjaro.. enough testing/hopping
__________________
_Ohh.))::_Linux_::((.Xoxo_ Last edited by SmajjL; 06-01-2020 at 09:25 AM. Reason: I rrrrrrefuse wordprocessors! :p |
Thread Tools | |
Display Modes | |
|
|