SageTV Community  

Go Back   SageTV Community > General Discussion > General Discussion
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

General Discussion General discussion about SageTV and related companies, products, and technologies.

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 01-21-2019, 09:30 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Maybe my expectations about how a program should run don't match with how the JVM operates. I'm a C# developer and don't feel like I need to know the nuts and bolts of the CLR to write an efficient application. While my C# programs are running I don't see the constant ballooning I see with Java. But that may be because Microsoft hides that part of the CLR. Or I don't know where to look. My C# applications always seem to use very little memory.
__________________
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
  #42  
Old 01-23-2019, 06:07 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by Taddeusz View Post
Maybe my expectations about how a program should run don't match with how the JVM operates. I'm a C# developer and don't feel like I need to know the nuts and bolts of the CLR to write an efficient application. While my C# programs are running I don't see the constant ballooning I see with Java. But that may be because Microsoft hides that part of the CLR. Or I don't know where to look. My C# applications always seem to use very little memory.
I wrote a program that broadcasted high resolution images with data on them (like time, weather and BeyondTV recordings) to a network of picture frames in my house in C#. The time I did this was when I was kind of a new to C#, but I learned quickly that I couldn't just let it go and do it's thing. I would run out of memory very fast even though I wasn't creating objects too large to fit in memory collectively and I was releasing all of the objects as soon as they were no longer needed. My remediation was to force it to happen between images and the problem went away. I never actually went back to figure out exactly what the problem was as I no longer use it. The take away is that even C# may give you a reason to find out why the CLR works the way it does.


I have a brief comment about the OOM issues mentioned. I have seen SageTV under VisualJVM. It's mostly char[] and byte[] arrays due to the database. I personally didn't notice anything odd when I was profiling for several weeks to get Carny working as fast as I could get it. Granted I wasn't looking at much along the lines of native memory consumption which is used a lot by SageTV for graphics, but at least within the heap, nothing appeared to be accumulating without governance.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache).
Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI.

Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom).
Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG
Reply With Quote
  #43  
Old 01-23-2019, 07:44 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by EnterNoEscape View Post
I wrote a program that broadcasted high resolution images with data on them (like time, weather and BeyondTV recordings) to a network of picture frames in my house in C#. The time I did this was when I was kind of a new to C#, but I learned quickly that I couldn't just let it go and do it's thing. I would run out of memory very fast even though I wasn't creating objects too large to fit in memory collectively and I was releasing all of the objects as soon as they were no longer needed. My remediation was to force it to happen between images and the problem went away. I never actually went back to figure out exactly what the problem was as I no longer use it. The take away is that even C# may give you a reason to find out why the CLR works the way it does.


I have a brief comment about the OOM issues mentioned. I have seen SageTV under VisualJVM. It's mostly char[] and byte[] arrays due to the database. I personally didn't notice anything odd when I was profiling for several weeks to get Carny working as fast as I could get it. Granted I wasn't looking at much along the lines of native memory consumption which is used a lot by SageTV for graphics, but at least within the heap, nothing appeared to be accumulating without governance.
Yeah, with C# and likely other .NET languages you do have to pay attention to if an object needs to be "closed" before it goes out of scope. "Using" statements as well as try/catch/finally are really handy for dealing with that.

I've been reading up on the differences between JVM and CLR as far as memory use is concerned. The main takeaway that I learned is that depending on the GC being used JVM is ultra-conservative about releasing memory back to the system while CLR is really aggressive by comparison.

That explains what I see with Java memory use. I still don't understand why a seemingly idle process would continue to create hundreds of MB of objects that need GC and produces the "healthy" sawtooth memory use pattern.
__________________
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
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
Why I will NEVER buy a ceton product ever again heffneil Hardware Support 1 08-20-2013 10:17 PM
Sage product is A+ but... gabrielcab General Discussion 1 01-18-2011 10:49 AM
Idea for new product :P MeInMaui The SageTV Community 7 09-16-2008 06:52 AM
An Incredible Product brandypuff General Discussion 7 06-27-2008 09:13 AM
Does this product exist? hechacker1 Hardware Support 4 12-06-2006 02:28 AM


All times are GMT -6. The time now is 09:23 PM.


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