(?) Creating RAMDISK

From Jose Nathaniel G. Nengasca

Answered By: Ben Okopnik, Kapil Hari Paranjape, Thomas Adam

(?) Hi there,

I just want to create a RAMDISK of 100MB to use as temporary storage for squid cache files, I am using redhat 8.0, using grub bootloader, with 750MB of RAM, the one on linux focus site is rather old (november 1999) howto. Can someone help me with this?

Respectfully yours,

(!) [Kapil] I think you have something confused here. As I understand it:
Squid creates an object cache in memory and periodically saves objects to disk when it runs out of space in memory.
You want to create a virtual (RAM) disk for squid to use as its disk. Instead why don't you increase the amount of memory available to its in-memory object cache?
(!) [Ben] If you have the kernel sources installed, take a look at "/usr/src/kernel-source-<version>/Documentation/filesystems/tmpfs". It's a memory-based file system, and is created (by root) with "mount". Here's an example:

See attached ben-fstab.txt

(!) [Thomas] I think Ben has missed the point. Squid doesn't care for the type of RAM being used. Sure, it needs physical RAM, but this is accessed on-disk by squid's "object cache". It is this that determines how much RAM is being used (see Kapil's answer above).
In /etc/squid.conf you can adjust this by changing:
cache_mem=50MB
to something more appropriate. Don't forget to issue:
squid -k reconfigure
once changes have been made to the file.


Copyright © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 95 of Linux Gazette, October 2003
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3   4   5   6   7   8 [ Index of Past Answers ]