I'm running a wordpress blog on my VPS, But MySQL Queries are taking too much time.
For example, it is taking more than 1.5 seconds to load a post from database.
But CPU and RAM usage is low on my server. I've 2GB RAM, and 1.2GB of it is free right now. also CPU usage is below 5%.
I'm running IIS 7.5
on Windows Server 2008 R2 Datacenter edition (64-bit)
, with MySQL 5.5
installed on it. (Also there is MS SQL 2012 Express installed on the machine, but it's inactive most of times)
PHP is running fast on my server, but MySQL queries seems to be too slow.
Also I've tried optimizing database from phpmyadmin, and speed becomes a little better, but still it's too slow.
Is this normal on a Windows VPS? How to improve MySQL performance?
Update: I've read somewhere that 127.0.0.1
as the host works better than localhost
, and I'm using 127.0.0.1
now, but still database queries are too slow.
Update 2: This is the HDD benchmark on my VPS:
Also there is report of another HDD benchmark tool:
- Read 50 MB file with 256 KB buffer:
Reading 52,428,800 B (50 MB) - 200 blocks
Success: 52,428,800 B (50 MB)
Time: 1.329
Speed: 39,463,373 B/sec (37.6 MB/sec)
- Read 50 MB file with 32 KB buffer:
Reading 52,428,800 B (50 MB) - 1,600 blocks
Success: 52,428,800 B (50 MB)
Time: 10.873
Speed: 4,821,734 B/sec (4.6 MB/sec)
- Read 50 MB file with 1 KB buffer:
Reading 52,428,800 B (50 MB) - 51,200 blocks
Success: 52,428,800 B (50 MB)
Time: 1:06.395
Speed: 789,648 B/sec (771 KB/sec)