Entries Tagged as 'System'

Mysql on Windows vs Linux

I was working on optimizing a Mysql database today and accidentally stumbled upon a benchmarking exercise. The original Mysql database is hosted on a Windows Server 2003. I develop on a Mysql database server running on Ubuntu Linux. The Linux server ran the same query twice as fast as the Windows server without using caching or anything. I know that Linux does I/O caching on its own as well so I even tried running the query after a fresh reboot to rule out that factor. Then I got help from a colleague and started tweaking with the my.cnf/my.ini to make sure they were the same and each time, the results came back about the same. Mysql on Windows was consistently slower than Mysql on Linux.

Then we decided to load the database onto other servers for more data points on this Mysql performance test. We ran the same query returning 429 rows of data with 13 table joins and a couple of sub-queries. All queries were run on the command line client on the servers themselves to avoid network lag.  All servers are running Mysql 5.0.x.

Results

1. Ubuntu Linux: 0.70 seconds
2. CentOS: 0.78 seconds
3. Windows 2003 Server: 1.40 seconds
4. Windows 2003 Server: 1.42 seconds

Server hardware

1. Ubuntu Linux
AMD ATHLON 64 X2 4200+
2GB DDR400
200GB 7200RPM SATA/150

2. CentOS
Dual Opteron 240
2GB DDR ECC
120GB 7200RPM SATA/300

3. Windows 2003 Server
Dual Xeon
2GB DDR ECC
7200RPM PATA

4. Windows 2003 Server
2 Dual Xeon (4 CPUs)
8GB DDR ECC
3 73GB 10,000RPM SCSI in RAID 5

In House Hosting vs ISP

Clients are always trying to determine if they should host their own site in house or using an ISP. While in the past I would definitely suggest using an ISP, it is not so cut and dry as the cost of servers and bandwidth have decreased dramatically. These days, I can build a server that is super fast for around $1,000. Getting a DSL line with static IP addresses cost around $75 per month. It allows for ease of system upgrade and for more advanced integration into business systems through programming. While there is the down side of power backup issues and hardware failures to contend with, it is still a viable option if the website is not a mission critical application.

Problem with php_curl

System:

Windows 2000 Server SP3
Apache2
php 4.x

Problem:

Enabling php_curl caused error when starting apache.

Error message: Unknown(): Unable to load dynamic library ‘php_curl.dll’ - The specified module could not be found.

Solution:

Make sure to copy the following files from the php\dll directory to the windows\system32 directory.

ssleay32.dll
libeay32.dll