|
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
|
||||
|
||||
Major Memory leak (Mapped File memory) during SageTV recordings
When SageTV (v7) records a file, it seems to map the file to memory. However, it never cleans up after itself and keeps consuming more and more memory. Using RAMMap (Sysinternals), I can see that SageTV consumed 4+GB of RAM while recording the news this morning. As soon as the news stopped recording, 4GB of RAM freed up on my server.
Has anyone else noticed this? Refer to these screenshots: RAMMap showing the Mapped File memory usage when recording the news. When the recoding ended at 9:00 AM, the memory usage instantly cleared out: Last edited by bradvido; 10-21-2011 at 08:16 AM. |
#2
|
||||
|
||||
I don't know how that can be happening because I only have 2 GB of RAM and make multiple recordings at the same time from 4 GB to 8 GB or more in size. Never saw this.
Gerry
__________________
Big Gerr _______ Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB. |
#3
|
||||
|
||||
Maybe Sage is writing to memory (i have 8gb avail) instead of deleting an old recording from the disk and making space?
I don't know but it needs to be fixed |
#4
|
||||
|
||||
I'm confused. You called it a leak and said it never gets cleaned up. But then you ended by saying it does give the memory back when the recording is finished. If that's true, then it's not a leak; it's just a large temporary memory demand.
I'm also not clear on whether the numbers you posted refer to actual physical memory in use, or just address space allocated. Mapping a 4GB file will take up 4GB of address space; that's what file mapping means. But it doesn't necessarily mean that all four GB will be swapped into physical memory at the same time. Is there some performance issue you're trying to diagnose? Or did you just see these numbers and think something must be wrong?
__________________
-- Greg |
#5
|
||||
|
||||
Quote:
Noticable, large performance issues are caused by this which leads me to believe that the memory space is reserved for Sage and not shared in anyway. I'm just curious as to why Sage is allocating that much space? Is it some sort of buffer? Write recordings to disk and let the OS handle the buffer. |
#6
|
|||
|
|||
I am not sure this is true at all. Like gplasky, my server only has 4GB of physical memory and I record several recordings at once of 6+GB per recording. Based on what you are saying, I would need to have something like 25GB worth of memory! Now could Sage be dumping all the streams onto the hard drive which is being misconstrued as using virtual memory and then after the steam is completed and properly stored, the system no longer sees it as virtual memory but rather a file storage? This would make a lot more sense.
There is no way Sage could function on my server if the recordings were being stored in RAM. All of my clients would completely suffer....
__________________
Sage Server: AMD Athlon II 630, Asrock 785G motherboard, 3GB of RAM, 500GB OS HD in RAID 1 and 2 - 750GB Recording Drives, HDHomerun, Avermedia HD Duet & 2-HDPVRs, and 9.0TB storage in RAID 5 via Dell Perc 5i for DVD storage Source: Clear QAM and OTA for locals, 2-DishNetwork VIP211's Clients: 2 Sage HD300's, 2 Sage HD200's, 2 Sage HD100's, 1 MediaMVP, and 1 Placeshifter |
#7
|
||||
|
||||
I would think the Windows swap file would come into play here.
Gerry
__________________
Big Gerr _______ Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB. |
#8
|
|||
|
|||
I have never seen this and I only have 3 gigs of memory on my server and record at times 7 recordings simultaneously and still have plenty of memory left to do comskip and run videoredo.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#9
|
||||
|
||||
Quote:
|
#10
|
||||
|
||||
Something else is at work here. Nobody else seems to have this issue. If you can grab a screen from process explorer so we can see what else is going on.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60 Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup. |
#11
|
||||
|
||||
This is as mentioned, the memory mapping. It is not using that much physical memory, it's just the way the system writes the stream to disk. Sage can only use as much memory as the JVM can hold, which caps out around 1.2GB. Win7-64 can map up to 8TB of address space. This can be used for everything from actual RAM, paged storage, mapped file access, or device driver memory maps. Sage, rightly so, allocates the recording file as a mapped file, so all it has to worry about is writing to the mapped location, and the windows system deals with actually writing the bits to disc as it sees fit. (this is why process explorers and such will show the drive access as coming from System, and not from SageTVService).
See: http://en.wikipedia.org/wiki/Memory-mapped_file
__________________
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 Last edited by Fuzzy; 10-21-2011 at 02:32 PM. |
#12
|
||||
|
||||
Ok that makes sense. But what if another process wants to use that memor space? From what Ive seen, sage doesnt share
|
#13
|
||||
|
||||
Applications don't ask for specific memory addresses. Applications ask for a certain sized chunk of memory. Windows then tells it ok, you can have this range of address space. That doens't even mean that space is physical memory. Even if you only have 1GB or ram in your system, windows has 8TB of available address space it can use for user mode programs. Addresses are not necessarily places in RAM, they are an index to data. That data can point to physical memory, but it can also point to files, devices, whatever.
__________________
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 |
#14
|
||||
|
||||
Not for mapped files. VM pages allocated to mapped files are backed by the files themselves. The page file comes into play only for pages that aren't backed by anything else (Java heap for instance).
__________________
-- Greg |
#15
|
|||
|
|||
same problem
Bradvido, SageTV is also hogging memory on my system, and this is a new problem. It eventually brings my W7-64bit system with 8GM RAM to it's knees, not due to CPU usage, but due to using all the RAM. SageTV gradually uses more and more memory while recording. When the recording is complete it releases this memory. But in the meantime, playback is slow to respond, and eventually nearly locks up when all available memory is used. Then all applications, such as the browser and Outlook also become slugs when the system has to go to virtual memory. Shutting down the other applications seems to have no effect as SageTV gobbles up that memory also.
It just started doing this. I am wondering if it is due to recent JAVA 64 bit version 6 update 29 that I installed. I have both the 32 bit and the 64 bit JAVA's. I will shut down the SageTV service and uninstall the 64 bit JAVA and see if that fixes the problem. Maybe I will also uninstall the 32 bit JAVA and reinstall it. This is one recent change that I can think of that might be doing this. I also recently installed the STV update; 2011110601. Sure hope that was not the cause. Hope this info help to lead to a solution. I will post further info as soon as I can. |
#16
|
||||
|
||||
several people in other threads are reporting issues with java 2.29... updating java should be looked upon as strictly optional, especially on a server that's reliant on it
/jer
__________________
AMD Ryzen 7 1700 w/ SageTV Server Linux V9.1.8.774 - Ubuntu 16.04LTS AMD64 -- 1x HDHomeRun Prime -- 1x HDHR-DT -- 1x HD-PVR 2x SageTV HD-300 Media Extenders 1x NVIDIA ShieldTV |
#17
|
||||
|
||||
Also, installing 64-bit java should have no bearing on sagetv, as it is a 32-bit java program. It won't use the 64-bit JVM, no matter what you install.
__________________
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
|
|||
|
|||
I have 4gb of ram on a win7 64 bit server. Sage is the only service running (other than standard windows services). I disabled the swap file, and rebooted. Computer reported over half the physical memory free. After about 5 days of running, the computer stops with an out of memory error.
I have re-enabled the swap file, but thought it was interesting that it runs ok for 4 days, and then runs out of memory. Never ran any programs to see what was consuming it though. Its either windows or sage or Java.
__________________
Sage 7 on Win8.1 i7 6TB server, 1 gig network, HD Homerun |
#19
|
||||
|
||||
Well, I can pretty much guarantee it isn't sage directly, as it can't use anything outside of the limits of the JVM (which will cap out at about 1.4GB max).
__________________
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 |
#20
|
|||
|
|||
My new Win7 x64 install is having a similar problem. The task manager also shows a process javaw.exe as growing. This is with Java 1_0_29.
I have not increased the heap on this system, so that is one of the next things to do along with researching the current "best" java version. |
Tags |
memory leak |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV Service memory leak? | valnar | SageTV Software | 8 | 03-23-2010 04:56 AM |
SageTV Process Memory Leak? | brandypuff | SageTV Software | 13 | 10-14-2008 05:14 PM |
Memory Leak in SageTV Transcoder | EdwardATeller | SageTV Software | 2 | 03-04-2008 11:47 AM |
SageTV client memory leak? | hocky98 | SageTV Software | 18 | 12-08-2006 01:32 AM |
Runaway Memory Leak in SageTV Service | morpheus | SageTV Software | 24 | 04-24-2006 12:40 PM |