On Jan 10, 2008 8:23 AM, Richard Freeman <<a href="mailto:r-mythtv@thefreemanclan.net" target="_blank">r-mythtv@thefreemanclan.net</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Marc wrote:<br>> I'm running a SVN(15354) frontend/backend on Gentoo with 32 bits and I'm not<br>> seeing this problem.<br>> asgard ~ # free -m<br></div> > snip...<br><br>I just noticed these posts. If you're concerned about memory leaks /
<br>etc looking at the output of free is just about useless. Look at how<br>much memory individual processes are taking up instead.<br><br>It is completely normal for a linux system with 500GB of memory and at<br>least as much hard drive space to swap to disk, and report most of the
<br>memory as in use just about all the time.<br><br>The reason memory seems to be always in-use is that "free" memory in<br>linux is memory that is not being used AT ALL for any purpose. Linux<br>tries to minimize the amount of completely-unused memory - preferring to
<br>use it for buffering or cache. When the memory is needed the cache is<br>purged and the buffers are flushed. This only improves system<br>performance by reducing disk access. If memory isn't needed for<br>something else you might as well use it as cache - it doesn't cost
<br>anything as cache can be instantly purged to be made available.<br><br>The reason swapping happens all the time on linux is because of the<br>"swapiness" setting. If a page of memory seems to be idle for a very
<br>long time the system will swap it out when it is otherwise not busy to<br>make more room for cache/buffers. The assumption is that something else<br>will need that memory before the idle app does, or that caching will
<br>generally improve performance. So even if there is free memory the<br>system will swap out empty pages. This behavior can be tuned with a<br>setting in /proc if necessary.<br><br>A memory leak is when an application allocates memory and then doesn't
<br>use it, or stops using memory but doesn't free it. It causes an<br>application's virtual memory use to grow, but its real memory use does<br>not necessarily grow as much (because of the aforementioned swappiness -
<br>linux just swaps the dead pages out to disk and never reads them back).<br> The ability to swap dead pages would probably depend on whether the<br>wasted memory fills entire pages - it still isn't ideal.<br><br>
I haven't observed memory leaks on my 64bit gentoo system, or on my
<br>32-bit frontend (with about 200MB available RAM and no swap). I have<br>increased my buffer sizes on my backend, so that can consume a fair<br>amount of virtual memory - but nothing really more than expected.<br><br>
When my myth system is slow I've found that the usual cause is IO<br>contention. Swapping contributes to this in part, but only in part.<br>The iostat tool can help troubleshoot this. The ionice tool can help<br>mitigate this. I run the backend with a medium realtime ioniceness
<br>setting - this allows the backend access to the disk just about anytime<br>it needs it without waiting in line. That and increasing my buffers<br>and getting rid of the buffer fsync have completely eliminated by<br>
IOBOUND issues.<br><br>In any case, the way to spot a memory leak is looking at the output of<br>top or ps -o args,vsz,rss -u mythtv (or whatever). Sorting top by<br>memory use is a good way to find out where all your RAM is going. You
<br>might be surprised to find out that it is something else entirely.<br><div><div></div><div><br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org" target="_blank">
mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br></div></div></blockquote></div><br><br><br>I understand how linux does its memory usage and what not. But i am not talking about using alot of my memory and it being 'slower'. When I say slow the mouse wont even move fluidly. It jumps 1/2 way across the screen as i move it. I look at htop and see mem usage is 100% and swap is 1000/2500m used. The usage of swap increases the longer I leave the frontend open. Looking at memory to processes correlation I see the mythfrontend processes each taking
9.4% of memory. And when there are 15 processes going for mythfrontend it eats everything up. When I killall mythfrontend the problem gets better. I can atleast run the frontend with some experience but the only way to really get a fast userspace is to reboot.
<br><br><br>Again I am using atrpms bleeding packages which are SVN r15333. I believe this my be a x86-64 issue. As my 32bit works fine with the same packages. both are F8 fully updated boxes.<br><br>How do i got about figuring out where the issue is? I am not the only one seeing this problem and its a SERIOUS one!
<br><br>If a Dev would like to take a look I would have no problem giving user shell access to the box. <br><br>Thanks,<br>Mitchell<br>