A quick and easy performance improvement

Julian Field mailscanner at ecs.soton.ac.uk
Wed Jul 26 19:26:12 IST 2006

Richard Lynch wrote:
> Julian Field wrote:
>> Richard Lynch wrote:
>>> uxbod wrote:
>>>> Why not hold the bayes on a RAM partition, and have a cronjob that 
>>>> periodically backs it up throughout the day so that changes are not 
>>>> lost if the server crashes ?
>>> That would definitely improve things.  Seek time in RAM is zero!
>>> While monitoring disk I/Os (iostat 1) I was surprised at the high 
>>> number for bayes.  I didn't expect to see it so high.  One my systems 
>>> it was actually higher than the I/O for the mail queues.
>> That's very interesting.
>> Most people these days just use 1 big partition for / and nothing 
>> else. So it won't be available to them. So why is this an improvement 
>> when /var/spool and /.spamassassin are on the same partition? I can 
>> see why, if they are on different partitions, though you're still 
>> relying on the mapping of sector number --> physical hard disk 
>> location. But if / and /var/spool are on the same partition anyway, 
>> why would it run any faster?
> I can't see why it would either.  If you're using one large partition 
> changing the directory structure wouldn't be worth anything as far as 
> performance goes.  In my case they are on different partitions.
>> I am sorely tempted to say that you have merely cancelled out the 
>> speed slowdown caused by splitting / and /var onto different 
>> partitions. If they are both on the same partition anyway, and are 
>> being written to a lot, they will end up very close to each other by 
>> virtue of how the filesystem is likely to work.
>> I think that splitting / and /var slowed your system down. You have 
>> just cancelled that out.
>> Thoughts?
> I think you're right.  Is it uncommon to have / and /var on different 
> partitions?   The sysadmins here argue for separate partitions because 
> it lessons the likely hood of the rootfs filling up.  They say that it 
> can hose your system to the point that you can't even logon to fix it.  
> So, we split / and /var (and others).  I think all of our unix systems 
> are that way.  Is this a bad practice?

I have found in the past that splitting the installation into many 
different partitions just causes more problems than it solves. Putting 
/var separate on Solaris is a classic example. People say "when your 
logs get big it won't fill /" which is true enough. But disks are huge 
and cheap these days. Why not just do it properly and roll your logs 
properly so they never occupy a lot of space? If you have them separate, 
then as you install more patches, /var/sadm will start to get very 
large, which there is nothing you can do about, so after 2 or 3 years 
your /var will fill and you'll have to start bodging things to get them 
out of /var to give you more room for /var/sadm.

I just find it causes more problems than it solves, so long as you set 
up your system to maintain itself properly. If you never roll 
/var/log/maillog on a MailScanner system then yes, it will get very 
large, but set it up properly and keep your logs and quarantines pruned.

Julian Field
Buy the MailScanner book at www.MailScanner.info/store

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

More information about the MailScanner mailing list