SageTV Community  

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

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-02-2008, 07:24 AM
vividweb vividweb is offline
Sage Aficionado
 
Join Date: Aug 2006
Location: Calgary AB
Posts: 401
Heap Size and Stuttering

I have been reading some recent discussions around increasing java heap size in order to make sage run a little better, so I increased my heap size to 512 and have experienced some strange results.

I have a four tuner system, one PVR-500 and two Network encoders that use DVBDream. I have 4 clients, two MVP's, one HD-100 and one PC. Sage runs as a service on its own server box. My PC client is a little under powered for HD but it would get by.

My strange results for increasing the java heap have affected my PC client. Previously when watching an HD hockey game (broadcast at 1080i) I would experience a slow degradation of the playback, it would slowly change from being flawless to being unwatchable because of stuttering and skipping. I attributed this to my client being underpowered even though my CPU was not maxed out and hadn't changed.

After changing the heap size I am able to watch the exact same HD broadcasts stutter free for whole game. It baffles me how the heap size on the server could boost up a client so much.

With so many people now running multiple tuner, multiple HD client systems does Sage need to increase the default value for the Heap size?
__________________

Sage Server: i5-2500K 8 GB DDR, 6000gb HDD, 4xHD-PVR < 4xBell 6141, Win7 x64
Client 1: HD-200, Panasonic 42PX75
Client 2: HD-300, Samsung LCD
Client 3: HD-300, Samsung PN50C550
Client 4: MS Surface Pro
Reply With Quote
  #2  
Old 06-02-2008, 12:08 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
More memory means less need to garbage collect. I suspect that your stuttering is happening when the java system is having to run the garbarge collector to free up memory.

On a single core machine, depending on the gargbage collection settings, the garbarge collector will interrupt the execution of the program to collect memory. These pauses are relative quick because Java doesn't free ALL memory on each pass. It basically uses a sweeping approach where it will attempt to free the "easy" to access memory first. But if this happens enough, then it will result in short pauses to the system.

On a multi-core machine and a recent jvm, you an have the garbage collector running in a separate thread. This can result in better garbarge collection without the "pausing" effect.

Since java uses a garbage collection model, then each new version of java comes with various tweaks to better help the garbarge collection performance. Prior to 1.4, garbarge collection was very bad.

Another thing to consider is that if you are running a server, then why not give java most of the memory for that system. If it's just going to sit around doing nothing, then you might as well give it to java
Reply With Quote
  #3  
Old 06-02-2008, 02:35 PM
jerryt jerryt is offline
Sage Fanatic
 
Join Date: Oct 2007
Posts: 832
Quote:
Originally Posted by vividweb View Post
I have been reading some recent discussions around increasing java heap size in order to make sage run a little better, so I increased my heap size to 512 and have experienced some strange results.
I want some of those strange results, How do I change the "Heap Size"?
Reply With Quote
  #4  
Old 06-02-2008, 02:40 PM
vividweb vividweb is offline
Sage Aficionado
 
Join Date: Aug 2006
Location: Calgary AB
Posts: 401
The discussion was in the Beta forum.

http://forums.sagetv.com/forums/showthread.php?t=23681

I agree stuckless, if the memory is there why not give to Java to help out, just didn't realize it could be done.
__________________

Sage Server: i5-2500K 8 GB DDR, 6000gb HDD, 4xHD-PVR < 4xBell 6141, Win7 x64
Client 1: HD-200, Panasonic 42PX75
Client 2: HD-300, Samsung LCD
Client 3: HD-300, Samsung PN50C550
Client 4: MS Surface Pro
Reply With Quote
  #5  
Old 06-02-2008, 03:26 PM
SpiffyRex's Avatar
SpiffyRex SpiffyRex is offline
Sage User
 
Join Date: Oct 2007
Posts: 57
Quote:
I agree stuckless, if the memory is there why not give to Java to help out, just didn't realize it could be done.
In most cases it's good to increase the heap to 512, more is not needed. However you need to make sure the OS doesn't start to page too much, XP and Vista need a lot of real memory to run smoothly. Also if you have enough memory you might like to increase the buffer cache (called system cache in windows) for improved I/O.
Reply With Quote
  #6  
Old 06-02-2008, 04:33 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Here is tuning guide from Sun.... It's fairly technical, but I've consulted it in the past when I've run into gc issues on other projects. GC Tuning Guide
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
How important is 64K block size msmith8228 Hardware Support 49 01-09-2010 07:08 AM
File size limitations? pawn SageTV Software 0 05-19-2007 06:53 PM
Severe stuttering (audio and video), what is this? haus SageTV Software 14 01-18-2007 09:44 PM
Bad stuttering when client buffer below 2 secs Olive SageTV Placeshifter 0 08-19-2006 12:14 PM
File Size Settings? Goodspike SageTV Software 5 12-07-2005 07:45 PM


All times are GMT -6. The time now is 06:17 AM.


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