Big Bang / Little Buck

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Here is what I have:
A lamp box (Linux,apache,mysql,php) that has >= 2.4Ghz Pentium 4, 1Gig
Ram, 2 40 Gig IDE harddrives (OS on one/mysql on the other).
The mysql database is getting large (several tables have several million
rows each). I have done a lot of work on indexes.
The system is on our corporate intranet.
The problem is it can get very slow.

My question is what will give me the biggest bang for my (bosses) buck?
More ram?
SCSI Hard drives?
Faster processor?
Duel+ processors?
Mysql on one box and php on another?
Other ideas?

Any thoughts would be appreciated.

Re: Big Bang / Little Buck

Quoted text here. Click to load it

More ram probably. 1 Gig really isn't a lot.

Re: Big Bang / Little Buck

Quoted text here. Click to load it

use a ramdisk. reserve 1 or 2 gig for ramdisk. serve "amp" from this
Did the trick for me. queries speeded up over a thousand percent.
Also, Xeon processors seem to perform better on dBases.... I use a dual
2.8GHz now.


Re: Big Bang / Little Buck

Mike Ayers wrote:

Quoted text here. Click to load it

I think you have to first determine where your bottleneck(s) are - so I'll
reverse your question:

- are you doing a lot of DB transactions - is your bottleneck database
- is it the disk I/O?
- how is the processor utilization when the system gets "slow?"
- are you running out of RAM and swapping?

Probably separating the web server from the DB is a good idea, but still you
have to first determine where your actual bottlenecks are before you can
decide for sure how to proceed.

Re: Big Bang / Little Buck

If I were you I wouldn't have so much data on such commodity hard
drives. I assume you have proper backup procedures?

I'd personally change the 2 x 40 GB drives into a RAID 1 configuration -
which would speed up reading a bit, linux software raid if nothing else.

Are you using MySQL 4? I have you looked into the use of the Query Cache?


Mike Ayers wrote:
Quoted text here. Click to load it

Re: Big Bang / Little Buck

Quoted text here. Click to load it

You have several issues with your current config that you need to
address first:

1) You have no data redundancy - you should be using RAID-1 for the OS,
you could also put the Web site on a RAID-1 array.

2) You need to put the database datafile on a RAID-5 array, at least 4
drives, 5 or 6 would be ideal for your system.

Now, since you can't really do the above on what I imagine is your
system, do the following:

Install 2 x 120GB drives in the machine, use RAID-1 mode (software, or
buy a RAID controller card), even IDE drives handle RAID well, you will
appreciate the read performance you get out of this and the fact that if
you loose one drive you are still up and running.

If you find that your system is slow serving pages where you have the
web server and database on a single CPU machine, then you have two

1) Getting a Dual CPU motherboard and using Dual CPU's to run the setup
2) Getting a second box to run the database on

You could also do the following - get a Dual CPU box, install the
database on it, and run the web server from your existing P4, but mirror
the drives on the existing P4.

If you want a cheap, quality, Dual CPU system, look at the ASUS PC-DL
Deluxe Dual Xeon board. If you get it with Dual 2.4ghz Xeon's and 2GB
RAM with a 550W PSU and the case/floppy/cd-rom and Dual 250GB SATA
drives, you are only looking at about $1600 (US). Just make sure that
your XEON chips are from the same LOT/Batch or you'll have problems.

My guess about your system is that you are performance bound on the
drive and that a faster CPU isn't going to help.

(Remove 999 to reply to me)

Site Timeline