Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2008 15:53:36 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        robert@webtent.com
Cc:        Robert Fitzpatrick <lists@webtent.net>, FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: db performance
Message-ID:  <20080117155336.0c38d86d.wmoran@potentialtech.com>
In-Reply-To: <1200602606.7281.48.camel@columbus.webtent.org>
References:  <1200602606.7281.48.camel@columbus.webtent.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Robert Fitzpatrick <lists@webtent.net>:

> We have several postfix transport gateways on different networks all
> working with local amavisd-maia+SA using a remote postgresql backend at
> one location. I am getting delays in the queues on a gateway server at a
> remote site since we added more memory to the db server. After seeing
> the issues of "SA TIMED OUT" in the logs, seems this was happening prior
> to the upgrade, but never to the extent, I guess, to delay much mail.
> Queues on a gateway of the same network as the db server working fine,
> but messages with the timeouts differ from one server to another.
> 
> After reading tuning, it suggests the SWAP should be double RAM.
> According to dmesg...
> 
> real memory  = 3220635648 (3071 MB)
> avail memory = 3150565376 (3004 MB)
> 
> we have 3GB of RAM available with actually 4GB physical RAM installed?
> Anyway, the SWAP is only 2GB, even with the average usage shown here,
> will increasing SWAP to 6-8GB help?
> 
> last pid: 49828;  load averages:  0.23,  0.21,  0.18    up 8+18:33:08  15:42:23
> 184 processes: 5 running, 158 sleeping, 21 waiting
> CPU states:  2.6% user,  0.0% nice,  1.0% system,  0.0% interrupt, 96.4% idle
> Mem: 446M Active, 1646M Inact, 236M Wired, 138M Cache, 112M Buf, 30M Free
> Swap: 2048M Total, 164K Used, 2048M Free

Adding swap is unlikely to help you, as you're not really using much memory.

> I also have assumed in the past that db performance could be better if I
> get off the system RAID-5 and put it on 1+0? The system has 4 SATA
> drives.

That will speed things up if IO is your bottleneck, but you've not
demonstrated that.

Which machine in this system is the bottleneck?  Are the Amavis machines
timing out, or is the PostgreSQL server too slow?  If I understand your
description, it sounds like a network problem to me ... i.e., machines
not on the same gateway as the PG server are experience slow network
response (or dropped packets?) that's causing amavis to time out while
trying to talk to PG.  I would suggest investigating there first.

-- 
Bill Moran
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080117155336.0c38d86d.wmoran>