SageTV Community  

Go Back   SageTV Community > SageTV BETA Release Products > SageTV Beta Test Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Beta Test Software Discussion related to BETA Releases of the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. regarding SageTV Beta Releases should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-19-2010, 04:43 PM
MrD MrD is offline
Sage Aficionado
 
Join Date: Feb 2005
Location: Washington DC
Posts: 387
Thread Priority

Is this option required on Linux?

-XX:ThreadPriorityPolicy=1

It's not there on SageTV 6 and it requires root to be enabled.

According to Sun:

Quote:
A thread priority regression in J2SE 5.0 has been corrected in Java SE 6 as well as J2SE 5.0, Update 6. Correct behavior is restored and a workaround no longer is needed.

On Windows, by default Java thread priority MAX_PRIORITY is no longer mapped to the highest native priority (THREAD_PRIORITY_TIME_CRITICAL). Instead it is mapped to THREAD_PRIORITY_HIGHEST. This change is necessary because THREAD_PRIORITY_TIME_CRITICAL threads may interfere with system threads and affect system responsiveness.

If you need to revert to the prior behavior (THREAD_PRIORITY_TIME_CRITICAL), you can set -XX:ThreadPriorityPolicy=1 .
__________________
[size=1]-MrD
=============
Linux Server 7.1.9 (1)HD300 (1) HD200 (1) HD100 (2) PC Clients
Intel Xeon L? 32Gb
CetonTV cable card /FIOS
Reply With Quote
  #2  
Old 07-19-2010, 05:39 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
It's not required...but you get better performance with it on since thread priorities will then be obeyed instead of making every thread the same priority.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #3  
Old 07-20-2010, 09:10 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by Narflex View Post
It's not required...but you get better performance with it on since thread priorities will then be obeyed instead of making every thread the same priority.
Would a viable alternative be to use -XX:ThreadPriorityPolicy=9999 to avoid the root requirement? Apparently, this will cause java threads to run at different priorities, where the highest priority java threads have "normal" priority, and the lowest have "nice" (low) priority. This means that low priority java threads might be starved on a CPU bound host running another (non-sage) job (like ffmpeg transcoding).

See http://tech.stolsvik.com/2010/01/lin...orkaround.html for a detailed description of this.

Speaking of priorities, is it possible to have sagetv start ffmpeg niced when doing transcodes? At least in V6, ffmpeg runs at "normal" priority when transcoding.

Drew
Reply With Quote
  #4  
Old 07-21-2010, 05:10 PM
MrD MrD is offline
Sage Aficionado
 
Join Date: Feb 2005
Location: Washington DC
Posts: 387
Quote:
Originally Posted by drewg View Post
Would a viable alternative be to use -XX:ThreadPriorityPolicy=9999 to avoid the root requirement?
This depends on a bug in the Java implementation -- which means it would work until the bug it fixed.
__________________
[size=1]-MrD
=============
Linux Server 7.1.9 (1)HD300 (1) HD200 (1) HD100 (2) PC Clients
Intel Xeon L? 32Gb
CetonTV cable card /FIOS
Reply With Quote
  #5  
Old 07-22-2010, 09:17 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by MrD View Post
This depends on a bug in the Java implementation -- which means it would work until the bug it fixed.
As long as you don't updated the JVM, you're fine. The thing I'm really concerned about is that sage's "normal" priority threads would really be niced, and would get swamped by things like ffmpeg transcode jobs.

Drew
Reply With Quote
  #6  
Old 07-22-2010, 07:07 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Quote:
Originally Posted by drewg View Post
Speaking of priorities, is it possible to have sagetv start ffmpeg niced when doing transcodes? At least in V6, ffmpeg runs at "normal" priority when transcoding.

Drew
I was going to post that it already did that....but then decided to look at the code first. Apparently we hadn't added 'nice' when doing transcoding (it does use nice for all other ffmpeg usage already)...but now it's been added for the next build.

And on Windows it was already reducing the process priority...not that you'd care about that though.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread Priority? cracklepopflash SageTV Studio 3 12-09-2009 08:03 PM
Channel Priority zoltran SageMC Custom Interface 6 04-24-2009 08:28 AM
Priority 150ht SageTV Software 0 12-23-2006 12:02 PM
How To Set Thread Priority for SageTV beckerhead SageTV Software 10 01-12-2005 06:34 PM


All times are GMT -6. The time now is 04:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.