<br><br><div class="gmail_quote">On Wed, Oct 26, 2011 at 3:14 PM, Jay Ashworth <span dir="ltr"><<a href="mailto:jra@baylink.com">jra@baylink.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">----- Original Message -----<br>
> From: "Roger Horner" <<a href="mailto:mythtvuser1818@gmail.com">mythtvuser1818@gmail.com</a>><br>
<br>
> > On Wed, Oct 26, 2011 at 10:17 AM, Tyler T <<a href="mailto:tylernt@gmail.com">tylernt@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> > So far it looks like turning off swap (the machine has 1G of RAM and<br>
> > Mythbuntu set up an additional 1G of swap) fixed it.<br>
> > Kinda strange, since before it was using something like 700M RAM<br>
> > plus 800M swap, and now it's just using 900M RAM.<br>
> ><br>
> Interesting! On my previous system (which only had 512MB RAM) I often<br>
> guessed that the stuttering was caused by it swapping out to disk, but<br>
> I always thought that problem was I didn't have enough RAM (which may<br>
> also have been true in my case). In my current system (which has 2GB RAM),<br>
> I have noticed that if it has been on for a while, almost all the RAM<br>
> will be used and a small amount of swap is also used, which has always seemed<br>
> strange to me.<br>
><br>
> I seem to remember reading that MythTV will fill up all unused RAM<br>
> with a buffer of recently recorded video to save on disk reads if another<br>
> process needs it. I wonder if there is a bug where when there is need for more<br>
> RAM it gets it from swap before freeing up space from this buffer? I think<br>
> I will turn off my swap space and see what happens (I only added it<br>
> because it seemed like a good idea at the time).<br>
<br>
</div>You might want to reconsider.<br>
<br>
Unlike Windows, on which the rule is "swap early and often", and where that<br>
particular tradeoff might be worthwhile, on Linux, processes are not paged<br>
out until there's no memory left, in general.<br>
<br>
The reason the free space indication goes down is that Linux tends to allocate<br>
most unused space for its buffer cache, adjusting as necessary when the ram<br>
is needed for programs.<br></blockquote><div><br>Isn't that what I said (though I incorrectly thought it was Myth not Linux)? My question is why would it use swap space if there is a buffer cache?<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
512MB really *isn't* enough ram, but if that's all you have, you'd better leave<br>
swap enabled, or you'll run out of memory and things will start getting killed.<br></blockquote><div><br>I agree, but that was my old system. My new one has 2GB, which should be enough for a combined Front and Backend (nothing else), but it still seems to start using a bit of swap space if the system has been on for a while. <br>
</div><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If you haven't already done it, making sure your OS and SQL are on one<br>
physical drive, and your video on another, is probably the easiest solution<br>
to disk contention problems.<br></blockquote><div><br>Already done. Small boot drive has OS and SQL (plus some space for MythVideo data). Large secondary drive has all my recordings. I haven't really been having any "disk problems" per say with the new systems, just curiuous that it would need to use swap at all.<br>
</div></div><br>