load testing and tuning a 4GB RAM server
cswiger at mac.com
Sun Apr 6 10:47:31 PDT 2003
Support <support at netmint.com> wrote:
[ ... ]
> Now my question. I am trying to stress test a new Dell PowerEdge server
> and find the limits of its hardware and my tuning. Here are the server
> * 2x Xeon 2.8 with SMP compiled, hyperthreading NOT compiled in kernel
> * 4 GB of RAM, 8 GB of swap on Raid 1 (15K RPM drives) for speed
> * User Data is on Raid 5 in a detached PowerVault
Given your planned usage, and the type of hardware you've got, I'd like
to redirect this thread to freebsd-isp as being more appropriate.
Also, your configuration is suited for where the users will be doing
mostly reads and not a lot of writes. If the users might be doing a lot
of writes, you should use RAID-1,0 instead of RAID-5.
> Contents of /boot/loader.conf:
> Contents of /etc/sysctl.conf:
Given the amount of memory you have, things like ipc.shm_use_phys and
vfs.vmiodirenable are a good idea. If this machine is primarily using
the network for web traffic, see the section in "man tuning" about
net.inet.tcp.sendspace and net.inet.tcp.recvspace in particular.
However, I wouldn't change the vm sysctl settings blindly-- the VM
system in FreeBSD does a really good job of self-tuning.
> Some info from kernel config:
> maxusers 0
> options KVA_PAGES=512
> options NSWAPDEV=1
> (the rest is pretty much my hardware, firewall and other irrelevant stuff)
However, possibly with a degree of self-contradictory advice :-), I'd
set maxusers to a specific value like 256 or so.
The notion of tuning kernel variables to the amount of memory on the
_build_ system-- which is not always the same as the system which will
be running the kernel-- doesn't strike me as the right thing to do, so I
tend to set this to 64 or so by default, and then change it on a
case-by-case basis as the need arises.
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.
[ ... ]
> Any ideas? Comments? Is my tuning decent, or would you change anything
> else? This server is to be a very loaded web/database server.
How many simultaneous users do you expect? WWW hits per day, or
pageviews (if you can distinguish)? Are you going to be using SSL, lots
of virtual domains, any special apache modules? Logfile analysis needs?
Also, what are you doing with the database; that is to say, which DB
software are you going to use, and what is the DB to be used for? Is
the data sensitive or important? If so, having a seperate DB server
which is not Internet accessible but on a small local subnet (talking to
a second NIC in the WWW server) would significantly improve the security
aspects, and would also help balance site load in several regards.
Specificly, disk I/O contention is likely to happen if the DB is
expected to see any significant usage while the drives are busy serving
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.
More information about the freebsd-isp