Re: Perl and a Ramdisk
- From: smallpond <smallpond@xxxxxxxx>
- Date: Fri, 30 Nov 2007 10:12:11 -0800 (PST)
On Nov 30, 12:46 pm, Bill H <b...@xxxxxxxxx> wrote:
I am working on a chat program and am thinking of using a ramdisk to
hold the chat data. Is there anything special I should know about
accessing ramdisk from perl or is it just another disk to perl? On my
development machine I don't have a ramdisk, so I will be using the HD
for storing while debuging, but on the machine it will run on there is
one, and it would be nice if I could just have a variable holding the
destination and only have to change that instead of changing any
routines that did any file i/o.
Bill H
"Premature optimization is the root of all evil."
-- C. A. R. Hoare
Your plan is good right up to the part where you actually
switch over to using the ramdisk. Every modern OS already
has excellent code to do secure and reliable caching of disk
data. I would see if the disk access is actually a problem
before changing, which should be just the filename that you
open or a symbolic link.
If you do create a ramdisk, you will need to create a
filesystem in it, unless you plan on using the raw disk.
You will also have to preload it and worry about saving
it on shutdown if it will contain any permanent data.
--S
.
- Follow-Ups:
- Re: Perl and a Ramdisk
- From: Bill H
- Re: Perl and a Ramdisk
- References:
- Perl and a Ramdisk
- From: Bill H
- Perl and a Ramdisk
- Prev by Date: Re: Net::SSH::Perl security question
- Next by Date: Re: Net::SSH::Perl security question
- Previous by thread: Perl and a Ramdisk
- Next by thread: Re: Perl and a Ramdisk
- Index(es):
Relevant Pages
|