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-19-2015, 08:18 PM
nycjoe's Avatar
nycjoe nycjoe is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: New York
Posts: 106
SageTV JVM RAM - Windows

This has been asked a million times, but I just can't find a clear thread that gives a straight answer... What's a good value to set java heap to?
I recently moved from sagetv Linux to Windows and it has been crashing on me non stop. I have plenty of RAM (16GB/win8.1) so I should have any contiguous memory amount available (all I have is a 4gb VM running on this host).

OOM crashes also seem to take down the Hauppauge tuner service which then also needs to be restarted (is that normal?).

Also, is there a place (and a reason) to set Xms? I believe I used to have that set very high as well.

I think I had it set to 1536mb on my previous machine, is that a good #?
https://screencloud.net/v/rNvh

BTW part of the reason I wanted to move Linux->Windows was because I was considering attaching the server to the L/R TV to replace an extender (I have vague memories of video skipping being zippier that way). BOY was that a flawed notion. The HD300's are unmatched, unparalleled, (unbowed, unbent, unbroken).
__________________
{"HW": "NUC",
"CPU": "i7-5557U",
"RAM": "16GB",
"Recordings": "2TB SATA",
"Imports": "2x 4TB USB",
"Clients": ["HD300", "HD200", "SageTVClient"]}

Last edited by nycjoe; 06-19-2015 at 08:22 PM.
Reply With Quote
  #2  
Old 06-20-2015, 08:43 AM
will will is offline
Sage Fanatic
 
Join Date: Jul 2009
Location: New York
Posts: 798
Quote:
Originally Posted by nycjoe View Post
I recently moved from sagetv Linux to Windows and it has been crashing on me non stop. I have plenty of RAM (16GB/win8.1) so I should have any contiguous memory amount available (all I have is a 4gb VM running on this host).
First off, SageTV is a 32bit application which means it can't address more than 2gigs of RAM - so all that extra RAM can't be used for SageTV...

Now there are ways to get a 32bit application to address up to 3gigs of RAM on certain 32bit Window Server versions (using physical address extensions for remapping memory). I wrote about this and SageTV/server stability almost six years ago.

With that being said, in theory, all 32bit applications on 32bit OSs should be able to address 3gigs of RAM if they are compiled a certain way (though the max appears to be 2gig for SageTV) and all 32bit applications on a 64bit OSs (like you are running) should be able to address 4gigs of RAM (if they were compiled a certain way). However, I still don't think SageTV can use more than 2gigs of RAM (I haven't verified this though).

I would recomend you play around with SageTV and try setting your heap size to 1000 (4096mb) and see if that makes a difference.

For the record, I have my HEAP set to 400 (1024mb) and SageTV runs very stable for me - six years running with a huge wiz.bin file.

I suggest you check out my post in the link above because it addresses the instability I had with my Hauppauge tuner and trying to use more than 2gigs of RAM for SageTV. I'm not sure how relavent my fix is for Windows 7/8/10 but it did take a very unstable SageTV system that crashed every few hours to being rock solid. Perhaps some of the things discussed in that forum can lead to some helpful Google searches.

Good luck getting your system stable.
__________________
Will

OS: Windows 7
Hardware: Intel Core i7-920 with 12GB RAM & an Adaptec 5805 with a Chenbro 36-port SAS Expander
Case: Antec 1200 with 4 iStarUSA trayless hot-swap cages (20 drives max)
Drives: 8 Toshiba/Hitachi 2TB drives in a RAID 6 & 7 Toshiba 3TB drives in a RAID 6
Capture Cards: HDHomeRun Connect Quatro 4, Hauppauge 60 HD-PVR
Players: 5 HD300s, 2 HD200s

Last edited by will; 06-20-2015 at 04:58 PM.
Reply With Quote
  #3  
Old 06-20-2015, 01:16 PM
reggie14 reggie14 is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
I've been under the impression that Sage won't use more than 1024MB.
Reply With Quote
  #4  
Old 06-20-2015, 06:46 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It's not that sage won't 'use' more than 1024, but set higher than that runs the risk of instability, because java's somewhat lazy garbage collection tends to lead towards out of memory errors if you go much higher than that. There's hopes that some architectural changes going forward will allow more memory use by splitting each extender instance to it's own JVM process. Apparently, that's how google is doing it for the Google Fiber, and it works very well. If you don't have extenders, and all your UI's are clients (which WOULD be in their own JVM's on the client machine), 1024MB is plenty for any sage server.

The 'simple fix' everyone seems to think shifting to 64-bit is turns out to not be so simple.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #5  
Old 06-21-2015, 07:15 AM
nycjoe's Avatar
nycjoe nycjoe is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: New York
Posts: 106
Is anyone using sagetv with java 1.8?

Quote:
Originally Posted by will View Post
For the record, I have my HEAP set to 400 (1024mb) and SageTV runs very stable for me - six years running with a huge wiz.bin file.
How large is a huge wiz.bin file? Mine is 40mb, which sounds small to me.

Quote:
Originally Posted by Fuzzy View Post
It's not that sage won't 'use' more than 1024, but set higher than that runs the risk of instability, because java's somewhat lazy garbage collection tends to lead towards out of memory errors if you go much higher than that.
IIRC, when setting up JVM, it's important to set xms and xmx not too far apart, in order to avoid aggressive garbage collection that never finishes or causes the process to hang etc. It's been about 10 years since I've really worked with java so I'm def rusty, though.

Looking at my hotspot log shows this:
jvm_args: -Djava.library.path=C:\Program Files (x86)\SageTV\SageTV\; -Xmx1536m vfprintf -Xms24m -server -verbose:gc -XX:+ForceTimeHighResolution

Which is a low xms value, does anyone know how to change that? I can't even figure out how to show the current value in windows (what's the win equivalent of 'ps'???)

This is what I had set previously:
$ grep JAVAMEM startsagecore
#JAVAMEM=-Xmx384m
JAVAMEM="-Xmx1536m -Xms1024m"
java -Djava.awt.headless=$HEADLESS -DUSERKEY=$userkey $JAVAMEM -XX:+UseAdaptiveSizePolicy -XX:MaxGCPauseMillis=25 -XX:GCTimeRatio=24 -XX:ThreadPriorityPolicy=1 $JAVAOPTS -cp Sage.jar:.:/:$(echo JARs/*.jar | sed 's/ **/:/g') SecuredLoader 0 0 x "sagetv Sage.properties" <&- &

I can share a pastebin of my hotspot if anyone is interested... Not sure if there are license keys in there or what.
__________________
{"HW": "NUC",
"CPU": "i7-5557U",
"RAM": "16GB",
"Recordings": "2TB SATA",
"Imports": "2x 4TB USB",
"Clients": ["HD300", "HD200", "SageTVClient"]}

Last edited by nycjoe; 06-21-2015 at 07:36 AM.
Reply With Quote
  #6  
Old 06-21-2015, 06:21 PM
fidget's Avatar
fidget fidget is offline
Sage Icon
 
Join Date: Jun 2003
Location: Cedar Rapids, Iowa, USA
Posts: 1,186
Quote:
Originally Posted by Fuzzy View Post
It's not that sage won't 'use' more than 1024, but set higher than that runs the risk of instability, because java's somewhat lazy garbage collection tends to lead towards out of memory errors if you go much higher than that. There's hopes that some architectural changes going forward will allow more memory use by splitting each extender instance to it's own JVM process. Apparently, that's how google is doing it for the Google Fiber, and it works very well. If you don't have extenders, and all your UI's are clients (which WOULD be in their own JVM's on the client machine), 1024MB is plenty for any sage server.

The 'simple fix' everyone seems to think shifting to 64-bit is turns out to not be so simple.
That would explain some of the strange memory problems I had been seeing. Fortunately, updating to Java 8 seemed to have fixed them.
__________________
Server: i5-2405S (4 core @ 2.5 GHz), 8GB RAM, NORCO RPC-4220 4U case
Tuners: 2 SiliconDust HDHomeRun , 2 Hauppauge HD-PVR Connected to 1 Pace700X and 1 TiVo Series 4
DVD Storage: 24 TB
TV Storage: 11 TB (4x1.5TB for recording, 5TB for archive)
Clients: 3
SageTV Extenders:5
Reply With Quote
  #7  
Old 06-21-2015, 08:02 PM
will will is offline
Sage Fanatic
 
Join Date: Jul 2009
Location: New York
Posts: 798
Quote:
Originally Posted by nycjoe View Post
How large is a huge wiz.bin file? Mine is 40mb, which sounds small to me.
"Huge" relative to what your wiz.bin file starts out at (around 400k with a fresh v7 install - almost a 10,000% increase).

Mine is ~40mb after almost six years of pretty heavy use. It seems like a large wiz.bin file maxes out between ~40mb to ~50mb based on a recent discussion. I think the reason why the wiz.bin stopped growing beyond 50mb is because STV started embedding meta data in v7.

40mb is nothing compared to a single recording but it seems like a pretty good size to me for a flat-file database.
__________________
Will

OS: Windows 7
Hardware: Intel Core i7-920 with 12GB RAM & an Adaptec 5805 with a Chenbro 36-port SAS Expander
Case: Antec 1200 with 4 iStarUSA trayless hot-swap cages (20 drives max)
Drives: 8 Toshiba/Hitachi 2TB drives in a RAID 6 & 7 Toshiba 3TB drives in a RAID 6
Capture Cards: HDHomeRun Connect Quatro 4, Hauppauge 60 HD-PVR
Players: 5 HD300s, 2 HD200s
Reply With Quote
  #8  
Old 06-22-2015, 05:47 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by will View Post
Mine is ~40mb after almost six years of pretty heavy use. It seems like a large wiz.bin file maxes out between ~40mb to ~50mb based on a recent discussion. I think the reason why the wiz.bin stopped growing beyond 50mb is because STV started embedding meta data in v7.
That info is all still in the wiz.bin, it's just embedded in the file to allow "recovery" of metadata if the files are moved.
Reply With Quote
  #9  
Old 06-22-2015, 08:57 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Maximum heap size varies slightly from system to system. You can test for your maximum heap size by dropping to a command prompt and entering something like the following:

Code:
javaw -Xmx1448M
BTW, that is the maximum heap size for my SageTV machine. I currently have mine set to just 1024 (0x400).
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #10  
Old 06-22-2015, 10:23 AM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
the Wiz.bin size has never been the issue for me, it's the plug-ins.

I gave up using Phoenix fanart/images because I have so many recordings that using artwork on my HD300 *always* causes the server heap to creep to max. This makes the interface sloth-slow within 2 days unless the server is restarted.

no offense to sloths intended.
Reply With Quote
  #11  
Old 06-22-2015, 03:59 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I thought the max you could use was 1024 (decimal) and I have been using that for years. I have 9 extenders connected to the system and I have to make sure that extenders are shut off when not in use or I will run out of JVM that will cause Sage to crash or slow to a crawl.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #12  
Old 06-22-2015, 04:00 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by wayner View Post
I thought the max you could use was 1024 (decimal) and I have been using that for years. I have 9 extenders connected to the system and I have to make sure that extenders are shut off when not in use or I will run out of JVM that will cause Sage to crash or slow to a crawl.
I've had mine set higher before without issue. I don't remember the reason I have mine set at 1024. Was not because of instability.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #13  
Old 06-23-2015, 08:55 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by Taddeusz View Post
I've had mine set higher before without issue. I don't remember the reason I have mine set at 1024. Was not because of instability.
I know in the past when I tried to set it higher the service would just crash because I didn't have that much contiguous memory. But if I remember correctly that was with 32 bit XP.
__________________
"Keep your goals away from the trolls"
Reply With Quote
  #14  
Old 06-27-2015, 09:38 AM
nycjoe's Avatar
nycjoe nycjoe is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: New York
Posts: 106
Quote:
Originally Posted by nycjoe View Post
This has been asked a million times, but I just can't find a clear thread that gives a straight answer... What's a good value to set java heap to?
I recently moved from sagetv Linux to Windows and it has been crashing on me non stop. I have plenty of RAM (16GB/win8.1) so I should have any contiguous memory amount available (all I have is a 4gb VM running on this host).
If anyone is interested, I broke down and moves sagetv back to Linux, which is running fine with 1.5gb xmx. I now have a weird setup where my nuc is running Windows (8), which allows the family to switch input and use the windows computer easily for whatever reason. Inside it, there is a virtualbox Linux vm running sagetv (I will never update or touch this server for any reason) that smb mounts a cifs share from windows for recordings, and I'm running another virtualbox Linux vm for external ssh/http access and stuff like comskip etc
__________________
{"HW": "NUC",
"CPU": "i7-5557U",
"RAM": "16GB",
"Recordings": "2TB SATA",
"Imports": "2x 4TB USB",
"Clients": ["HD300", "HD200", "SageTVClient"]}
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
SageTV Lic (windows) limiter SageTV Marketplace 0 05-01-2013 05:39 AM
Sagetv and WIndows 7 nadler SageTV Software 3 12-23-2009 09:45 AM
SageTV License in Hauppauge HD-PVR & SageTV Media Center for Windows Bundle LookitsErin SageTV Software 4 05-28-2009 02:16 PM
Can SageTV Linux use same plugins as SageTV XP Windows? TechBill SageTV Linux 3 10-02-2007 12:59 AM
SageTV Releases SageTV Lite PVR Software for Windows Hardware OEMs dkardatzke Announcements 0 07-06-2005 09:43 AM


All times are GMT -6. The time now is 10:35 PM.


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