![]() |
|
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.) |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Maxing out Java Heap at 799mb
Java heap is at 539/799/799 right now. I run vista business 32bit and have 2gb of RAM. it would appear I need to bump up my Java heap, but doing so would seem to leave me with only about half my RAM for OS stuff. Not sure if that how it works or not, but if so then should I look into adding another Gig of ram to my HTPC?
__________________
Windows 10 Sagetv 9 64bit (9.2.5) HVR-2255 x3 OTA |
#2
|
||||
|
||||
If you are running STVi's that are that extensive graphically, then yes, your option for better performance would be to get more ram on there. You can still bump up the heap larger, and windows will just have to swap stuff a bit more, so you'll get hurt on overall system performance, but might get a bit smoother fanart and such... just try it out and see...
That said.. RAM is actually pretty cheap...
__________________
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 |
#3
|
||||
|
||||
Here's a question, anybody figured a way around Java's sometime "weird" limiting of Heap Size?
|
#4
|
||||
|
||||
there is nothing weird about java memory management... it's just poor to begin with.. never expect 'good' behavior from any JVM, memory wise... if only sage was .net.. hehe
__________________
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 |
#5
|
||||
|
||||
Quote:
You must be a very hard core java developer/engineer (engineer, if I had to guess) that has done extensive research on the jvm memory sub system. Perhaps you can explain why I should never expect to see 'good' behaviour from the jvm. I'm always trying to better understand the inner workings of java.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
||||
|
||||
Mainly that it's very unpredictable what the actual maximum is. It seems to vary from PC to PC from one moment to the next.
|
#7
|
||||
|
||||
I see. I'm not sure the "real" default heap size is actually documented anywhere, so yeah, if an application doesn't specify it's memory requirements then i'm not sure what it would be...and it probably would differ from java version (not necessarily machine to machine). But, if we are talking about sage, then I can say that on linux, they set the default memory size to be 256mb (which I usually increase to 1 gig).
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#8
|
||||
|
||||
Supposedly it's 1906MB or something, but I've never been able to actually start a VM with that. I was playing a little while ago with BMT and "accidentally" set that test install to import way too much stuff and ran out of heap, so I remember trying to just set Sage to the max I could and I think at that time I couldn't manage over 1100MB, today I tried, same machine and could do 1600MB....
|
#9
|
||||
|
||||
Two main complaints I have with JVM is that:
1. The arbitrary fixed max size has to be declared at runtime. 2. The JVM will never release memory back to the operating system. Admittedly, this is probably based on the original incarnations of Java being designed primarily for smaller applets, that usually have fixed memory footprints, it doesn't scale well to large dynamic apps like sage.
__________________
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 |
#10
|
||||
|
||||
Quote:
![]() I guess i've never hit the upper limit, but, just to test this on my machine, I could create a machine at 2600mb... but not at 2700... and I think you are right, that the limit will vary from machine to machine depending on resources, etc. I think that java fails if it cannot allocate a contiguous block of memory. I'm guessing the bmt issue was related to the dvd profiler xml... that's a very large file, and bmt uses a DOM parser (not smart) and so it has to cram it all into memory. A think to note about java memory, is that if you allocate memory to the jvm, then the jvm will hold onto that memory and not let other system resources use the memory. Within the JVM it will continue to allocate objects into that space and it won't really try to free those objects until it has to. Depending on your jvm version, java may just let them accumulate until it determines it can't actually create another object, and if so it will run the garbage collector, and then try to allocate the object again. If it can't free enough contiguous heap space to create the object, then it will fail with an Out Of Memory error. Keep in the mind the actual process is alot more complex than my simple explanation, but the bottom line is really... unless you are seeing out of memory errors, or you are experiences freezes in the application related to the garbage collector running, then something like 539/799/799 is probably ok. This differs from .net (at least my understanding of it) in that in .net, an application can access the complete memory on the system. But like java, it also uses a garbage collector to reclaim objects. Both Java and .net use very similar models for garbage collection, (including when to run and how to run), but I personally like the "constrained" memory model of java, since I can control how much memory i'm willing to allow the application to abuse.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
||||
|
||||
Quote:
![]() BTW... i agree with your complaints (now that I know what they are)... but I'd still rather have the fixed memory constraints of Java than an open upper limit. Imagine how unresponsive your machine would get if Sage could allocate the entire system resources... including swap... because of some memory leak a plugin that some developer wrote as an add on ![]()
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#12
|
||||
|
||||
You can specify memory limits programatically in .NET, and even localized to certain 'jobs'. More importantly, this can be done dynamically while the program is running, instead of having to be determined prior to any code execution.
__________________
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 |
#13
|
|||
|
|||
Holy crap, you guys. You turned my brain into a soup sandwich. I'm not this technically inclined when it comes to computer stuff. It's taken me 3 years just to learn how to use imports.
![]() I was thinking about moving to Win7 x64 and throwing in a 2x2 or 2x3 or something memory so I wouldn't run into a JVM issue. Souns like 2600mb is the limit regardless though?
__________________
Windows 10 Sagetv 9 64bit (9.2.5) HVR-2255 x3 OTA |
#14
|
||||
|
||||
I wasn't trying to start some conversation about JVM vs. CLR, as it's really moot in regards to sage... i was merely trying to answer Stanger's question accurately, with 'no-one seems to be able to figure out where the JVM max comes from'.
__________________
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 |
#15
|
||||
|
||||
Quote:
As a rule of thumb, I tend to set the Sage max memory to 256mb (which is their base) * the number of of concurrent extenders. (that calculation may be a bit aggressive, but it also doesn't account for plugins, etc, so it may all work well in the end)
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#16
|
|||
|
|||
Quote:
![]() The idea is that if the app needs that much memory it will need that much again, and so it holds onto the memory that it assumes it will need later on. The the application is allowed to grow to the size it needs, and over time it will sort of hit equilibrium. |
#17
|
||||
|
||||
Quote:
__________________
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 |
#18
|
||||
|
||||
Quote:
That will print out the version info if successful and fail if it can't create the VM. I've never been able to get anything over about 1600MB, even though the test machine is W7 x64 with 6GB of ram. Quote:
![]() ![]() And the DOM parser made sense for the way it was used originally. Any interest in a SAX parser? ![]() |
#19
|
||||
|
||||
Quote:
Quote:
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#20
|
||||
|
||||
Quote:
Of course this makes no sense anymore when 12GB of memory costs only $200 ![]() Quote:
Quote:
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java Heap Size | rickgillyon | SageTV Beta Test Software | 48 | 12-14-2011 04:47 AM |
Java Heap Size | craigap | SageTV Media Extender | 21 | 03-27-2010 10:53 AM |
Post Your Java Heap Settings | HuMan321 | SageTV Software | 9 | 05-20-2009 08:36 PM |
Java Heap help | gibsonpa | SageTV Software | 3 | 08-06-2008 03:11 PM |
Java Heap in vista | hellsingfan | SageTV Software | 3 | 06-29-2008 06:57 PM |