Print

Print


Arthur Sherman wrote:
> Hi,
>
> I have a server with 3GB RAM running
> sendmail/dovecot/bind/apache/proftpd/Mailscanner/SpamAssassin/antivirus @
> CentOS-4.4.x86, hosting several domains.
>
> There are these lines in /etc/fstab:
> none                    /dev/shm                tmpfs   noexec,nosuid,rw
> 0 0
> none /var/spool/MailScanner/incoming tmpfs defaults 0 0
>
> 'df -h' shows that /dev/shm takes 50% of RAM, while there are actually some
> Kbytes there:
> Filesystem            Size  Used Avail Use% Mounted on
> none                  1.5G   28K  1.5G   1% /var/spool/MailScanner/incoming
>
> My questions:
> 1) how can I make /dev/shm smaller, say 512MB? I believe it will be more
> than sufficient for Mailscanner.
> 2) what else can I make run from /dev/shm to gain performance?
>
> Thanks!
>   
I think you're misunderstanding the entire /dev/shm and tmpfs.

tmpfs is a filesystem that is suppose to live entirely in memory,
whether that be RAM or swap it doesn't matter. Specifying a size
parameter and the df -h output to a tmpfs will appear to be very
misleading, the kernel will actually not consume that amount, that is
essentially the maximum amount of size that the tmpfs can take up.

Now /dev/shm on the other hand is just a location of shared memory. You
commonly see it implemented as a tmpfs, however it does not necessarily
have to be. It's basically just a shared memory segment that processes
can share data between.

>
>
> Best,
>
> --
> Arthur Sherman
>
> +972-52-4878851
> CPTeam 
>
>