SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations > SageMC Custom Interface
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageMC Custom Interface This forum is for discussing the user-created SageMC custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-15-2009, 01:00 AM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
JVM Heap Size reported different on Server than Extender

Why do my Server and my HD200 Extender report different JVM usage?

My setup is as shown in my sig, except that at the moment the server is running the std STV, not MC. I just haven't bothered to turn MC back on on the server since upgrading to 6.5.

The HD200 running SageMC right now reports 168MB/414MB/533MB. The Server right now reports 109MB/143MB/533MB. Shouldn't they report the same numbers, or does each device use its own share of the Heap and report it separately? Can someone explain how the JVM Heap is allocated among Server, Clients, Extenders and Placeshifters?

(I posted this in the SageMC forum since I have MC loaded, but if this is more appropriate in a different forum, please move as appropriate)
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
  #2  
Old 02-15-2009, 03:47 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
If you run Sage in service mode, then the server UI runs in a separate process with its own JVM and heap, and those are the numbers you'll see reported in the server UI. Extender and Placeshifter clients all run in the service process and share a heap, so they should all show the same numbers as each other, but not the same as the server UI (in service mode).

If you don't use service mode, then the server UI runs in the same process as the Extender and Placeshifter clients and should show the same numbers (assuming you sample them at the same time).

(SageTV Client, of course, runs entirely on the client computer and doesn't use any server resources to speak of.)
__________________
-- Greg
Reply With Quote
  #3  
Old 02-15-2009, 11:09 AM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
I do run in service mode, so that partly explains the different numbers. They must share the same pool of memory, or do they? I only changed one properties value to increase the Max Heap to 512, and both the server and the extender reports changed their max to 533.

In the example above, the server reports 109MB in use, the extender reports 168MB in use, so summed that means 277MB is in use. The server reports 143MB as currently allocated (Total), the extender reports 414MB allocated, so the sum of those is 557MB. If they both use their full allocation, then clearly the 533 max is overrun.

Do I need to keep track of the "Total" number from each extender/client/placeshifter and add it to the "Total" for the server and adjust my Max Heap accordingly?

Further, since I run in service mode, when I open a SageTV window on the server, I'm opening a client. Do the JVM numbers reported from that client window represent the JVM memory used by just that client window on the server, or the combined memory used by the client window as well as the service? If this is only reporting the memory used by the client, how do I get a report of memory used by the service?
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
  #4  
Old 02-15-2009, 11:54 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
JVM heap size is a registry setting, not a .properties file setting. So when you change it, the change affects all SageTV processes on that machine, not just the service.

In service mode, there are two SageTV processes that run on the server: the service (SageTVService.exe) and (when active) the UI (SageTV.exe). The two processes do not share memory or heap; they run in separate memory spaces, each with its own Java heap of the specified max size. (The 512 v. 533 business comes from different ways of calculating "mega".)

The numbers you see in any given client are the total numbers for the process running that client. So in server UI you're seeing the numbers just for that UI process (SageTV.exe), which does not include the service or any network clients.

In an Extender or Placeshifter client, the numbers you see are for the service process, which runs all Extender and Placeshifter clients in the same process. There is just one heap for all of those clients, and the numbers reported are the totals for all (excluding the server's UI process as noted above). Sage does not track the heap usage for each connected client individually, just the total per process.
__________________
-- Greg
Reply With Quote
  #5  
Old 02-15-2009, 01:59 PM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
Thanks for the excellent explanation

Thanks for clarifying property vs registry. I forgot that this was a registry change.

The explanation of memory usage makes more sense now. While it initially seemed counter-intuitive, it is logical that what I am seeing on the extender is the service mode, since that is what the service mode is there to do....doh!

OTOH, you're saying that the client on the server has its own heap, so while it isn't encroaching on the JVM memory set aside for the service, it does mean that I'm potentially allocating twice as much total system memory to Sage when the server client is active, correct? So, for example if a person is running a bunch of extenders, they may want to bump their heap to 1024. If they do that and also start a client session, the client is also going to set its max to 1024, even if it doesn't need it. If the system only has 2GB, then it's possible for all available memory to be hogged by the JVM Heaps
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
  #6  
Old 02-15-2009, 02:42 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
The max number just means the heap cannot grow beyond that size. If you hit that limit, you'll get more frequent garbage collection, but if you never come close to that limit, the memory won't be allocated.
__________________
-- Greg
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
Java Heap Size rickgillyon SageTV Beta Test Software 48 12-14-2011 04:47 AM
Heap Size and Stuttering vividweb SageTV Software 5 06-02-2008 04:33 PM
Wrong video library size reported... AngelofDeth SageTV Beta Test Software 0 03-16-2007 09:27 PM
Setting JVM heap sizes kminder SageTV Software 7 12-11-2006 10:13 PM
Jvm Heap Size broderp SageTV Software 6 08-30-2004 02:31 PM


All times are GMT -6. The time now is 11:14 PM.


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