|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
How can I utilize a ramdisk?
Hey everyone, I was wondering if there would be a good way to impliment the 1g of RAM I have in my server... I know I definately don't need that much to run the system so here's what I want to try to do:
I'd like to keep ~300mb (or less if you think it'd be fine) for system use and then allocate the rest of memory for use while watching TV... like when I'm just surfing the channels just to see what's on. The reason why I want to try to do this is because 1) The hard drive would be doing less work 2) I think it may attribute for a little bit more responsiveness while changing channels. 3) I also think it'll help in displaying on the server since it'll be instantaneously reading/writing... I don't know this at all though, just guessing. My problem is that my Linux expertise is limited to the days when I had my Zaurus organizer and tweaking that out all the time... ramdisks were dictated by the kernel on that system (If I remember correctly...). I just don't know how to create the ramdisk on startup and while I look through the init.d folders it all seems pretty daunting because I don't know what phase I need to be in to create the ramdisk... I already tried it and on boot up fstab can't mount the ramdisk since it hasn't been formatted, and will always need to be reformatted on startup. Has anybody out there tried this? Is this a waste of time to try to do? |
#2
|
||||
|
||||
Quote:
Assuming you are wanting to use the ramdisk for liveTV video recordings... You cannot specify a different recording directory for LiveTV, and Sage always tries to write recordings (including LiveTV) files to the disk with the most free space, so Sage is proabably never going to use the ramdisk.
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#3
|
|||
|
|||
The way linux does it's memory is a bit different than other systems and most of the time a ramdisk gives no benefit. Linux will always try and use up all of the physical memory, if your programs aren't using the memory it will go to file buffer cache.
The nice thing is that it acts like a ramdisk but is much more flexible and "just works". Anytime you read or write something to a disk it will keep it in memory, and will stay there in memory until you filled up all available physical memory. At that point it will kick out older file data from memory and replace it with the new. Acting quite like a ramdisk but being able to be bigger (if you have more memory free than 300mb) and you don't have to worry about managing it (instead of moving files in and out of a ramdisk it works with disks themselves) You can even prime the cache by adding a startup script that simply does a "cat [filename]" and it will put it into buffer cache immediately, provided you know which files you are going to use ahead of time (we do this at work for our search engine systems) |
#4
|
|||
|
|||
I thought that all processes have a quota limit on memory allocation max (adjustable).
|
#5
|
|||
|
|||
Quote:
I'm not completely sure but I don't believe either limits or ulimit will control amount of buffer cache available to a process. You can set some kernel tuneables to tweek things if you really want to, but again it's something you have to set, default it's everything in or out gets buffered no matter the process. |
#6
|
||||
|
||||
Quote:
I was thinking it'd be the same with MPEG2 video while it was being played back for a casual user (someone who doesn't want to meddle with the guide and other features... the server is trying to act as a server with a display occasionally being used by other people who just want to channel up and down through the channels and maybe taking the next step in using the RW/FF). I just don't know how to map out the memory where it's embedded where process allocation is not done to the full 1G of RAM, but to whatever I allocated.... maybe it'd be easier to get an iRAM device (I just don't have the money to spend to get that!). Quote:
Last edited by AboveUnrefined; 02-01-2006 at 06:26 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|