Ability to throttle background processes? - Printable Version +- Forum (http://forum.xbian.org) +-- Forum: Software (/forum-6.html) +--- Forum: Testing & Experimental (/forum-21.html) +--- Thread: Ability to throttle background processes? (/thread-521.html) Pages: 1 2 |
Ability to throttle background processes? - 2twisty - 25th Feb, 2013 01:53 AM Since the Pi is limited in processing power, it would be helpful if certain background processes could be assigned a lower priority, such as library scanning. I have thousands of TV episodes and several hundred movies in my collection, and while the Pi is scanning the disks to include them in the library, the CPU is at 70-90% utilization. Some of this excess overhead is because I'm using NTFS for the drives. I'm going to convert to ext4, but even then, it would be nice to be able to tell the Pi that library scanning takes a back seat to playback. Unfortunately, since XBMC is monolithic, I can't use available linux tools to control process priority. This is something that would have to be implemented in the code. Is this something that should be requested of the XBMC devs? In that world, Pi and Android users are the minority, and most users have plenty of processing power to fly through a library update. I fear that asking in that community would result in no action since there are so few of us who would really benefit from that capability. Ideas? RE: Ability to throttle background processes? - CurlyMo - 25th Feb, 2013 01:55 AM https://github.com/xbianonpi/xbian/issues/87 Re: Ability to throttle background processes? - BartOtten - 25th Feb, 2013 02:20 AM This is no solution to the library scanner as you can't start and stop it without killing xbmc.....or can you.. (guess it can...maybe belese knows how to do it) RE: Ability to throttle background processes? - rikardo1979 - 25th Feb, 2013 02:21 AM (25th Feb, 2013 02:20 AM)BartOtten Wrote: This is no solution to the library scanner as you can't start and stop it without killing xbmc.....or can you.. (guess it can...maybe belese knows how to do it) you should be able stop scanning library manually, if im not mistaken RE: Ability to throttle background processes? - belese - 25th Feb, 2013 03:38 AM No you can't, only start it. RE: Ability to throttle background processes? - 2twisty - 25th Feb, 2013 03:41 AM So, adding the ability to stop the scan is something that would have to be implemented by the XBMC maintainers? If there was a way to stop and start the scan, or better yet, PAUSE it, we could tweak our screensaver modes to run the scan only when the system is idle. RE: Ability to throttle background processes? - rikardo1979 - 25th Feb, 2013 03:44 AM (25th Feb, 2013 03:38 AM)belese Wrote: No you can't, only start it. yes you can 100% sure as I just did it Just start scan your media to library, than when is scanning evoke contextual menu as you are still on the source what you scanning and select Stop scanning RE: Ability to throttle background processes? - rikardo1979 - 25th Feb, 2013 03:48 AM (25th Feb, 2013 03:41 AM)2twisty Wrote: So, adding the ability to stop the scan is something that would have to be implemented by the XBMC maintainers? Start/Stop scan files into library is already in XBMC for some years, read my post above RE: Ability to throttle background processes? - belese - 25th Feb, 2013 03:53 AM Sorry misreaded Yes, you can manually, but not with an xbmc api. RE: Ability to throttle background processes? - BartOtten - 28th Feb, 2013 11:22 AM 2twisty: could you be so kind to request the api change / feature? RE: Ability to throttle background processes? - 2twisty - 28th Feb, 2013 11:57 AM I assume you mean that I should make the request at the XBMC github, right? https://github.com/xbmc/xbmc/issues/2318 RE: Ability to throttle background processes? - CurlyMo - 28th Feb, 2013 07:03 PM We already have an issue like this on our github. RE: Ability to throttle background processes? - 2twisty - 1st Mar, 2013 12:30 AM OK. After I posted this on their github, they told me that they only take bug reports on github and closed it -- they asked that I post it to their forum, instead. So, here's the link. If you would find this feature useful as an exposed feature in JSON, please pop in an comment so that they know that others would find this useful. http://forum.xbmc.org/showthread.php?tid=157860 RE: Ability to throttle background processes? - CurlyMo - 1st Mar, 2013 12:36 AM Now i understand what you did Awaiting their response. As far as i can see in the code this is already supported: Code: else if (execute.Equals("updatelibrary") && params.size()) This part is executed with the updatelibrary function, if will check if a scan is already running and if it isn't starts the scan. If it is it will stop the scan. So you just need to run the updatelibrary function twice i think. Also the core of XBMC has no such thing as pausing the scan and continuing it: Code: void Start(const CStdString& strDirectory, int flags); RE: Ability to throttle background processes? - 2twisty - 1st Mar, 2013 01:50 AM That might work. So, does IsScanning() return a bool as to the state of scanning? This function works like the Uncertainty Principle. The act of measuring its state will change its state. I'd much rather see discrete start and stop commands. So, is IsScanning() exposed by API? If so, we could use it to measure the state by changing it...but that's not ideal. Generally, scans are short and only picking up new items, so maybe this is considered an annoyance only during initial scan or a complete library rebuild. |