high priority - renice/ionice app at startup (Winamp, audio)
high priority - renice/ionice app at startup (Winamp, audio)
Hallo,
i'm running Winamp on Wine 2.15. It works properly mostly but sometimes when there's higher disk i/o or cpu usage on the system there are short audio dropouts or distortions.
So i want to try to raise cpu and i/o priority (renice, ionice) of all wine processes. What's the best way to achieve this? The Winamp process has a dynamic name and PIDs are always different so i'm not sure how to properly target the processes with a pre-script in q4wine.
Any ideas?
Linux 4.12.8-2-ARCH x86_64 GNU/Linux
wine v2.15
q4wine 1.3.5
Winamp v5.666 Build 3516
i'm running Winamp on Wine 2.15. It works properly mostly but sometimes when there's higher disk i/o or cpu usage on the system there are short audio dropouts or distortions.
So i want to try to raise cpu and i/o priority (renice, ionice) of all wine processes. What's the best way to achieve this? The Winamp process has a dynamic name and PIDs are always different so i'm not sure how to properly target the processes with a pre-script in q4wine.
Any ideas?
Linux 4.12.8-2-ARCH x86_64 GNU/Linux
wine v2.15
q4wine 1.3.5
Winamp v5.666 Build 3516
Re: high priority - renice/ionice app at startup (Winamp, au
@Maniaxx,
Take a look at the Wine Staging Wiki : Environment Variables ...
Specifically the section on Realtime Priorities ...
Bob
Take a look at the Wine Staging Wiki : Environment Variables ...
Specifically the section on Realtime Priorities ...
Bob
Re: high priority - renice/ionice app at startup (Winamp, au
Thanks, i've changed my prefix in q4wine to:
and priority is 90 when i start Winamp in q4wine.
But when i double-click a mp3,mod,xm directly in Thunar/XFCE priority is not overridden.
Any idea how i can get it up there as well? Its a mime-type that was set up by Wine itself (i guess).
Code: Select all
%CONSOLE_BIN% %CONSOLE_ARGS% %ENV_BIN% STAGING_RT_PRIORITY_SERVER=90 STAGING_RT_PRIORITY_BASE=90 %ENV_ARGS% /bin/sh -c "%WORK_DIR% %SET_NICE% %WINE_BIN% %VIRTUAL_DESKTOP% %PROGRAM_BIN% %PROGRAM_ARGS% 2>&1 "
But when i double-click a mp3,mod,xm directly in Thunar/XFCE priority is not overridden.
Any idea how i can get it up there as well? Its a mime-type that was set up by Wine itself (i guess).
Re: high priority - renice/ionice app at startup (Winamp, au
It doesn't help though. RTPRIO is 90 but drop-outs are still there on high i/o. I probably do need ionice.
Any idea how to do that?
Any idea how to do that?
Re: high priority - renice/ionice app at startup (Winamp, au
This command will find all the current Mime-type Wine associations for your Linux Desktop:Maniaxx wrote:...
But when i double-click a mp3,mod,xm directly in Thunar/XFCE priority is not overridden.
Any idea how i can get it up there as well? Its a mime-type that was set up by Wine itself (i guess).
Code: Select all
find "${HOME}/.local/share/applications/" -type f -name "wine-extension*.desktop"
You might want to disable winemenubuilder.exe to stop Wine overwriting these Mime files.
E.g. when installing new stuff (in any WINEPREFIX):
Code: Select all
WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe
Re: high priority - renice/ionice app at startup (Winamp, au
You've confirmed that the wine-server process priority is altered? Say with: ps or htop ?Maniaxx wrote:It doesn't help though. RTPRIO is 90 but drop-outs are still there on high i/o. I probably do need ionice.
Any idea how to do that?
If the priority is really applied then it sounds more like a kernel scheduler issue - processes are getting "too long" CPU time slices.
Have you tried a more interactive kernel scheduler? MQ or BFQ say?
ionice isn't going to help Wine / winamp... That should be fairly obvious...
You might benefit from ionice'ing Thunar!
Bob
Re: high priority - renice/ionice app at startup (Winamp, au
The 'wine-extension-mp3.desktop' looks like this:Bob Wya wrote:[...]Mime-type Wine associations for your Linux Desktop[...]
Just edit the files you want to change.
Code: Select all
[Desktop Entry]
Type=Application
Name=Winamp
MimeType=audio/mpeg;
Exec=env WINEPREFIX="/home/user/.wine" wine start /ProgIDOpen Winamp.File.MP3 %f
NoDisplay=true
StartupNotify=true
Icon=F465_winamp.0
Code: Select all
user 13478 1 ? /usr/bin/wineserver
user 13484 1 ? C:\windows\system32\services.exe
user 13486 1 ? C:\windows\system32\explorer.exe /desktop
user 13489 1 ? C:\windows\system32\winedevice.exe
user 13498 1 ? C:\windows\system32\plugplay.exe
user 13504 1 ? C:\windows\system32\winedevice.exe
user 13516 1 ? C:\Program Files (x86)\Winamp\winamp.exe Z:\media\Volume-F\MP3-E\Eric.mp3
Code: Select all
user 13563 1 ? /usr/bin/q4wine-helper --prefix Default --nice 0 --program-bin /home/user/.wine/drive_c/Program Files (x86)/Winamp/winamp.exe --wrkdir /home/user/.wine/drive_c/Program Files (x86)/Winamp/
user 13565 13563 ? /bin/sh -c cd '/home/user/.wine/drive_c/Program Files (x86)/Winamp/' && STAGING_RT_PRIORITY_SERVER=90 '/usr/bin/wine' 'winamp.exe' 2>&1
user 13566 13565 ? winamp.exe
user 13569 1 ? /usr/bin/wineserver
user 13575 1 ? C:\windows\system32\services.exe
user 13578 1 ? C:\windows\system32\explorer.exe /desktop
user 13580 1 ? C:\windows\system32\winedevice.exe
user 13590 1 ? C:\windows\system32\plugplay.exe
user 13596 1 ? C:\windows\system32\winedevice.exe
Yes, i check with:Bob Wya wrote:You've confirmed that the wine-server process priority is altered? Say with: ps or htop ?
Code: Select all
ps ax --format uname,pid,ppid,tty,cmd,cls,pri,rtprio
I only have 'noop deadline [cfq]' in the standard kernel. They say some system background services rely on CFQ priorities so it probably wouldn't be a good solution in the long run.Bob Wya wrote:Have you tried a more interactive kernel scheduler? MQ or BFQ say?
I thought instead of lowering "all others" i better raise wine. Who knows what other programs might create high I/O as well (ftp, samba, games...). But i will try that next.Bob Wya wrote:ionice isn't going to help Wine / winamp... That should be fairly obvious...
You might benefit from ionice'ing Thunar!
Re: high priority - renice/ionice app at startup (Winamp, au
I'm using the MQ variant of the Deadline scheduler...
I also go for a 1000 HZ Preemtible (Low-Latency Desktop) Kernel config.
It's BS that you need CFQ (unless you're running a server)!
Your background processes will continue to run fine - they'll just not get huge slices of disk I/O time.
If you try to run a more stock Kernel setup with Gentoo - your DE grinds to a halt when you're compiling lots of packages...
For your Wine Mime-type desktop entry example - you'd want:
Bob
That's worth a shot!I also go for a 1000 HZ Preemtible (Low-Latency Desktop) Kernel config.
Code: Select all
uname -r
4.12.8-gentoo
Your background processes will continue to run fine - they'll just not get huge slices of disk I/O time.
If you try to run a more stock Kernel setup with Gentoo - your DE grinds to a halt when you're compiling lots of packages...
For your Wine Mime-type desktop entry example - you'd want:
Code: Select all
[Desktop Entry]
Type=Application
Name=Winamp
MimeType=audio/mpeg;
Exec=env STAGING_RT_PRIORITY_SERVER=90 STAGING_RT_PRIORITY_BASE=90 WINEPREFIX="/home/user/.wine" wine start /ProgIDOpen Winamp.File.MP3 %f
NoDisplay=true
StartupNotify=true
Icon=F465_winamp.0