XAMPP Win7上太慢 [英] XAMPP on Win7 too slow
问题描述
我在Windows 7旗舰版上运行XAMPP 1.7.1。一切(阿帕奇&安培; MySQL的)。工作除了速度精细
I'm running XAMPP 1.7.1 on Windows 7 Ultimate. Everything (Apache & MySQL) is working fine except for speed.
当我打开的http://本地主机/ ,我必须等待视图大概1-3秒的网页。在我看来,它应该是最多几百毫秒。
When I open http://localhost/, I must wait probably 1-3 seconds for view a webpage. In my opinion, it should be at most some hundreds miliseconds.
基本情况:
- 在等待加载网页本地主机,状态栏说:等待本地主机......
- CPU仍然空闲(无活性增加,而负载)
- 在本地主机没有苛刻的PHP脚本,当有简单的phpinfo(),即使有长期重脚本问题。
- 禁用MySQL服务器不影响速度
- 我的电脑:AMD Turion 64 X2处理器; 1,6 GHz的双核,2 GB内存,100 GB HDD
我做了一点简单的基准PHP脚本测试HDD / CSS速度:
I've made a little simple benchmark PHP script to test HDD/CSS speeds:
<?php
function getmicrotime() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function testReadWrite() {
$timeStart = getmicrotime();
$filename = "test.txt";
file_put_contents( $filename, '' ); // prepare empty file
for ( $i = 0; $i < 1000; $i++ ) {
$a = file_get_contents( $filename );
file_put_contents( $filename, $a . '.' );
}
return round( getmicrotime() - $timeStart, 3 );
}
function testCpuSpeed() {
$timeStart = getmicrotime();
$var = '';
for ( $i = 0; $i < 100000; $i++ ) {
$var = sha1( md5( $i * $i * $i * $i * $i * $i * $i * $i * $i * $i ) );
}
return round( getmicrotime() - $timeStart, 3 );
}
echo "Read/write #1: " . testReadWrite() . "<BR>";
echo "Read/write #2: " . testReadWrite() . "<BR>";
echo "Read/write #3: " . testReadWrite() . "<BR>";
echo "CPU speed #1: " . testCpuSpeed() . "<BR>";
echo "CPU speed #2: " . testCpuSpeed() . "<BR>";
echo "CPU speed #3: " . testCpuSpeed() . "<BR>";
?>
我的电脑的结果:
My PC results:
- 读/写:5.134 / 3.431 / 3.494
- CPU速度:0.816 / 0.767 / 0.795
一个网站主办的结果:
- 读/写:7.768 / 7.69 / 7.371
- CPU速度:0.232 / 0.234 / 0.234
我的一个服务器的结果(如电脑空闲几乎我的电脑,但快一点点):
One of my server's results (as idle computer nearly as my PC, but a little bit faster):
- 读/写:0.088 / 0.168 / 0.185
- CPU速度:0.191 / 0.189 / 0.189
所以,我不认为那是因为我的电脑速度,但我敢肯定,有一些另外一个问题。
你有XAMPP速度在Windows 7(或Vista)?
So I don't think that it is because of my PC speed, but I'm sure that there's some another problem. Do you have some experience with XAMPP speed on Windows 7 (or Vista) ?
感谢。
推荐答案
如何让WAMP服务器试试?
How about giving Wamp Server a try?
安装文件小了很多(16MB)比较XAMPP(44MB)。
The installation file is a lot smaller (16mb) compare to XAMPP (44mb).
这篇关于XAMPP Win7上太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!