Set new CPU Priority for omxplayer
|
11th Jan, 2013, 04:57 AM
Post: #1
|
|||
|
|||
Set new CPU Priority for omxplayer
Does anyone know which file contains the omxplayer call?
I wanted to check if I can edit the call to lower the CPU priority (nice -n -10 omxplayer...). The reason is to hopefully get a smoother playback, when some background processes are running. Had some troubles yesterday evening with parallel running openvpn, pyload (-> python) and high CPU usage of the current NTFS-3G driver. |
|||
11th Jan, 2013, 05:02 AM
Post: #2
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
To start with, can you share the NTFS-3G driver?
pilight - modular domotica solution
|
|||
11th Jan, 2013, 05:08 AM
Post: #3
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Sorry, I don't understand what you mean?
It's the standard builtin ntfs-3g driver set via fstab. Code: UUID=DA205B73205xxxxx /mnt/hdd ntfs-3g noatime,nodiratime,async,rw 0 0 And that's the result with 2 parallel downloads. So you see, no much CPU left for the omxplayer to get a smooth playback. http://www.imagebanana.com/view/wdobkkj8/top.jpg So the idea was to assign more CPU usage/priority to the omxplayer, as I wasn't able to find methods to optimize the openvpn or python runtime. And unfortunately we didn't get the new NTFS driver running yet. |
|||
11th Jan, 2013, 05:14 AM
Post: #4
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Quote:And unfortunately we didn't get the new NTFS driver running yet. I thought you did. pilight - modular domotica solution
|
|||
11th Jan, 2013, 05:23 AM
Post: #5
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
No, not really.
I only got a nice fullscreen of error messages and realized that this is too big for my Linux skills after 3 days of trying gizag pointed out that the driver in the first post was wrong and that he would perhaps give the new version a try. But until now no new post from him, so I think he also had no luck yet. Just got the tip in the XBMC IRC channel that the omxplayer isn't using any CPU power. So the next try would be XBMC itself and/or the xbmc.bin. |
|||
11th Jan, 2013, 06:39 AM
Post: #6
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
I've added the following line to the "do_start" function in "etc/init.d/xbmc":
Code: renice -10 -p $(pgrep xbmc.bin) But the CPU priority is still 0 after a restart. When I execute the command in the command line it's working fine. Can anyone please help with the init script? |
|||
11th Jan, 2013, 06:08 PM
Post: #7
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
To improve playback, wouldn't you increase the priority assigned to xbmc.bin, rather than lower it? AFAIK this would be how it's done in Windows. Of course it may be inverse in Linux. Just curious.
|
|||
11th Jan, 2013, 07:03 PM
Post: #8
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Yep, it's inverse in Linux:
http://www.nixtutor.com/linux/changing-priority-on-linux-processes/ Quote:The Linux niceness scale goes from -20 to 19. The lower the number the more priority that task gets. CurlyMo, can you please help how to edit the start script to set a new CPU priority of "-10" for the xbmc.bin process? I wasn't able to get it working. |
|||
11th Jan, 2013, 08:59 PM
Post: #9
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
(11th Jan, 2013 07:03 PM)namtih Wrote: Yep, it's inverse in Linux: Thanks for the explanation namtih. It's really nice to have someone willing to help educate, rather than troll of flame people for asking questions. Asking questions is just as valid a means of learning as RTFMing. |
|||
11th Jan, 2013, 09:07 PM
Post: #10
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Quote:CurlyMo, can you please help how to edit the start script to set a new CPU priority of "-10" for the xbmc.bin process? Look into the '-N' flag of start-stop-daemon pilight - modular domotica solution
|
|||
11th Jan, 2013, 09:25 PM
Post: #11
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Quote: -N, --nicelevel int http://linuxreviews.org/man/start-stop-daemon/ |
|||
12th Jan, 2013, 12:23 AM
Post: #12
|
|||
|
|||
RE: Set new CPU Priority for omxplayer | |||
20th Jan, 2013, 06:47 PM
Post: #13
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
I don't know the exact reason, but since setting this value I had several freezes while watching a movie or video addons. The complete Pi just froze.
I don't understand why setting another nicevalue is causing this, but at the moment I can't recommend to set/change this value. |
|||
20th Jan, 2013, 07:56 PM
Post: #14
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
Pretty simple, the nice value is limiting the CPU XBMC can use. Due to the lack of power, the RPi doesn't have enough resources to let XBMC run smoothly while limited in CPU power.
pilight - modular domotica solution
|
|||
20th Jan, 2013, 08:00 PM
Post: #15
|
|||
|
|||
RE: Set new CPU Priority for omxplayer
But I set it from 0 to -10. So I assigned a higher/more priority to the XBMC process. So why got the stability worse?
|
|||
« Next Oldest | Next Newest »
|