STT works less well when another application has focus. How can I improve STT to work as part of the OS? My virtual assistant program can do things like move windows around, but it seems to work best when it has the systems focus. When another application comes to the front, it works less will. I've written this in python. Can I decrease the nice level of the process from within Python 3, or is there a better way to keep this application active and listening? Here's a link to the application, but I don't expect anyone to look at it. https://github.com/MikeyBeez/Juliet
I'm running Ubuntu 18.04, Python 3 in a conda virtual environment, and I'm running the GNOME DE.
I'm having some problems where GNOME Shell freezes because of a application (usually Firefox or discordapp).
Does decreasing its nice value to something around -1 prevent freezing even when under high load from some application?
My main goal is raising the desktop responsiveness under load.
System info:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
hardware: https://www.asus.com/Laptops/ASUS-VivoBook-15-X510UR/specifications/ + a 250 GB M.2 SSD
extensions:
ls .local/share/gnome-shell/extensions/
[email protected]
[email protected]
[email protected]
[email protected]
cpufreq@konkor
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
transparentosd@ipaq3870
[email protected]
[email protected]
[email protected]
[email protected]
also may be of note that I have no swap.
It seems to me that the whole nice/priority scheme doesn't actually do anything.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10084 dick 39 19 1221848 225120 6128 S 407.6 1.4 23478:00 povrayws
5311 dick 20 0 2904912 325728 40324 S 382.1 2.0 133:06.54 qtpovray
Given these two jobs, I would expect povrayws to sit at 0% cpu while qtpovray is busy. And this is what happens when I run this setup on Windows.
povrayws is a cpu/fpu intensive daemon job that will run for months (building an animation). If there is anything else the computer wants to do, I want this job to basically stop.
qtpovray is a sometimes cpu/fpu intensive gui job for developing the animation. If he wants to run, he should preempt the daemon and get close to 800% cpu. (If the daemon is not running, he will take 800% cpu.)
I reniced povrayws in top and ran
chrt -i --pid 0 10084
to set him to idle priority. And still he is getting more cpu than the interactive job. There is no I/O going on to muck up the scheduling. It is just a couple megs of memory and as much cpu as I can throw at it.
And again, when I run this setup on Windows 8, povrayws.exe will sit near 0% when something else is going on.
I wondered if it was my i7's hyperthreading that was confusing the scheduler, but I see the same behavior on a six core i5. (On the i5, Minecraft is fighting with the idle daemon for the cpu.)
IIRC, 20 years ago, this worked as expected, but the last 5 years I'm noticing this 'broken' behavior. It's finally annoying me enough to ask,
has anyone seen idle tasks actually yield to higher priority? It's a pretty edge case to have an 800% cpu, 0% I/O idle task.
Is there any way to check my nice lvl? I did try with ps
, but for some reason the output does not show the column NI which is meant to show the lvl priority if I'm not wrong.
ps -fl -c
F S UID PID PPID CLS PRI ADDR SZ WCHAN STIME TTY TIME CMD
0 S sebas 9761 26810 TS 19 - 6564 wait 18:07 pts/4 00:00:00 bash
0 R sebas 25389 9761 TS 19 - 5661 - 18:27 pts/4 00:00:00 ps -fl -c
I noticed in my system monitor app, on the "Processes" tab, that one can change the 'priority' of a certain program. What specifically would this do? (I'm new)