151 lines
5.4 KiB
HTML
151 lines
5.4 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<META NAME="generator" CONTENT="lgazmail v1.4G.k">
|
|
<TITLE>The Answer Gang 95: Creating RAMDISK</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
<!--endcut ==============================================-->
|
|
<!-- begin 6 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>Creating RAMDISK</H3>
|
|
|
|
|
|
<p><strong>From Jose Nathaniel G. Nengasca
|
|
</strong></p>
|
|
<p></strong></p>
|
|
|
|
<p align="right"><strong>Answered By: Ben Okopnik, Kapil Hari Paranjape, Thomas Adam
|
|
</strong></p>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Hi there,
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
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?
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Respectfully yours,
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Kapil]
|
|
I think you have something confused here. As I understand it:
|
|
</blockQuote>
|
|
<blockQuote><BLOCKQuote>
|
|
Squid creates an object cache in memory <EM>and</EM> periodically saves
|
|
objects to disk when it runs out of space in memory.
|
|
</BLOCKQuote></blockQuote>
|
|
<blockQuote>
|
|
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?
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Ben]
|
|
If you have the kernel sources installed, take a look at
|
|
"<TT>/usr/src/kernel-source-<version>/Documentation/filesystems/tmpfs</TT>". It's
|
|
a memory-based file system, and is created (by root) with "mount".
|
|
Here's an example:
|
|
</blockQuote>
|
|
<p align="center">See attached <tt><a href="../misc/tag/ben-fstab.txt">ben-fstab.txt</a></tt></p>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Thomas]
|
|
I think Ben has missed the point. Squid doesn't care for the <EM>type</EM> 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).
|
|
</blockQuote>
|
|
<blockQuote>
|
|
In <TT>/etc/squid.conf</TT> you can adjust this by changing:
|
|
</blockQuote>
|
|
|
|
<blockquote><pre>cache_mem=50MB
|
|
</pre></blockquote>
|
|
<blockQuote>
|
|
to something more appropriate. Don't forget to issue:
|
|
</blockQuote>
|
|
|
|
<blockquote><pre>squid -k reconfigure
|
|
</pre></blockquote>
|
|
<blockQuote>
|
|
once changes have been made to the file.
|
|
</blockQuote>
|
|
|
|
<!-- end 6 -->
|
|
<!-- *** BEGIN copyright *** -->
|
|
<hr>
|
|
<CENTER><SMALL><STRONG>
|
|
<h5>
|
|
<br>Copyright © 2003
|
|
<br>Copying license <A HREF="">http://www.linuxgazette.com/copying.html</A>
|
|
<BR>Published in Issue 95 of <i>Linux Gazette</i>, October 2003</H5>
|
|
</STRONG></SMALL></CENTER>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<SMALL><CENTER><H6 ALIGN="center">HTML script maintained by
|
|
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
|
|
Starshine Technical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H6></SMALL></CENTER>
|
|
<HR>
|
|
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr>
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<p align="center">
|
|
<table width="100%" border="0"><tr>
|
|
<td align="right" valign="center"
|
|
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
|
|
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
|
|
><A HREF="../index.html"
|
|
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
|
|
ALT="[ Table Of Contents ]" border="0"></A
|
|
><A HREF="../lg_answer.html"
|
|
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
|
|
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
|
|
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
|
|
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
|
|
<A HREF="../../tag/bios.html">Meet the Gang</A>
|
|
<A HREF="1.html">1</A>
|
|
<A HREF="2.html">2</A>
|
|
<A HREF="3.html">3</A>
|
|
<A HREF="4.html">4</A>
|
|
<A HREF="5.html">5</A>
|
|
<A HREF="6.html">6</A>
|
|
<A HREF="7.html">7</A>
|
|
<A HREF="8.html">8</A>
|
|
</td>
|
|
<td align="left" valign="center"><A HREF="../../tag/kb.html"
|
|
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
|
|
ALT="[ Index of Past Answers ]" border="0"></A
|
|
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
|
|
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
|
|
</p>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<!--endcut ========================================================= -->
|
|
<P> <hr>
|
|
<!--startcut ======================================================= -->
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</p>
|
|
<!--endcut ========================================================= -->
|
|
<!--startcut ======================================================= -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|