Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 2003 15:17:52 -0400 (EDT)
From:      Support <support@netmint.com>
To:        freebsd-isp@freebsd.org
Subject:   Re: load testing and tuning a 4GB RAM server
Message-ID:  <20030406145845.R18790-100000@netmint.com>
In-Reply-To: <3E906828.8060001@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[..clip..]

> However, possibly with a degree of self-contradictory advice :-), I'd
> set maxusers to a specific value like 256 or so.

I will set it to 384 that the system already auto-defaults it to, unless
someone can suggest why I should leave it at 0. Perhaps you guys should
make it very clear in the manuals or LINT that autotuning only happens at
boot time because there possibly is a perception that it auto-tunes on a
running system. Even after I read all threads regarding this that I can
find, I am still not sure what sysctl vars will be able to auto-tune at
RUNTIME while the load creeps up. I am sure the important ones like
nmbclusters and n/mbuf variables can't. So which can?

> Also, increase NSWAPDEV to at least two, so you at least have a
> possibility of adding more swap to a running system or for adding some
> in order to take down the primary swap area for some reason.

I probably will never need to increase swap without rebooting because
there is no available disk space to do it. Is there a reason to make it 2
at the expense of losing KVA memory if you know that adding swap will
entail a reboot (i.e. you can recompile kernel first)?

> How many simultaneous users do you expect?  WWW hits per day, or

At the lower end 1500 to 2000 and possibly as high as 4000 established web
connections at peak times at any given moment. And as little as 500 at
off-peak times. The web traffic will split 25-30% dynamic PHP/Perl (75% of
which will require DB interaction) and 70-75% pure file downloads. This
will amount to millions of connections per day, so I think looking at it
from the constant load point of view allowing for X many connections
established is a better idea.

> pageviews (if you can distinguish)?  Are you going to be using SSL, lots
> of virtual domains, any special apache modules?  Logfile analysis needs?

Yes to SSL (openssl, mod_ssl), yes to SSL virtual domains with their own
IPs, yes to normal virtual domains with with their own IPs.

I am thinking of running Apache modules for Perl and PHP but the problem
is I can't maintain security and wrap the executed code with modules.
Wrapcgi allows me to do that. I heard Apache 2 modules can be assigned
user/group permissions which will essentiall make wrapcgi unnecessary, but
I just don't know yet. Any advice with that?

> Also, what are you doing with the database; that is to say, which DB

MySQL for 90-95% and PostgreSQL for 5-10% of usage. The reason for going
with 1 server instead of 2 is to create chunks of users per server and
allow them to use unix sockets. As soon as load is too high, we just get
another web/db server. Not sure what kind of usage the databases will see,
most likely 80-85% reads and 15-20% writes.

[...clip...]

> up user files.  That's aside from the fact that you really don't want to
> keep database files on RAID-5 storage in the first place, either-- keep
> the DB on RAID-1 or RAID-1,0 if you can: use some of that 15K swapspace
> if you need to.

Chuck, I understand what you're saying. Unfortunately, the decision to go
with RAID 5 is financial. Is there concrete evidence that RAID 5 is
absolutely terible for read/write access? It's been holding up pretty well
in tests.

Thanks, and please cc: me on replies.

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030406145845.R18790-100000>