Jump to content

Recommended Posts

Had a PHP site on an old server:

1x 800Mhz (maybe dual CPU I'm not sure, but does it matter?)

2GB RAM

Windows Server 2003 - IIS - PHP 5.2.1

 

Transfered site to new server:

2x 3Ghz CPU

2GB RAM

Windows Server 2003 - IIS - PHP 5.2.3

 

Reports that took 3 minutes on old server take 5 minutes on new server.

The specific page tested has 3 main parts:

-Scan directory over the network and insert into MySQL DB.

-Read 200k text file from local drive line by line and insert into MySQL DB.

-Read 10k text file from local drive line by line and insert into MySQL DB.

 

I didnt save the test results, but were talking 25 seconds compared to 140 seconds for the first 2 parts individually.

This is with identical code on both machines.

I disabled the MySQL inserts for the testing, so this is the PHP processing alone.

The new machine is on a different switch, but, still on the same subnet as the old machine, so network conditions should be the same. It's even dual NIC, old was single.

 

I'm no expert, and very new to IIS (touched it 3 times).

Getting rid of IIS is not an option, it's on a corporate network.

PHP is installed as ISAPI module.

Have tried with output_buffering On and Off, no difference.

 

Any other info that would be helpfull let me know.

 

Here is the code that does the 200k file, keep in mind it's the same code on old server.

$spotlist = file ($fairview1spotlist);
if (!$spotlist) { echo "could not open spotlist file: " . $fairview1spotlist; }
foreach($spotlist as $spotid) {
if (substr($spotid,-8,2) != "_p") { 
	$spotid = substr($spotid,0,(strlen($spotid)-6)); //remove file extention
        	while(strlen($spotid) < 12) {
        		$spotid = "0" . $spotid; //left pad 0 until 12 char long
        	}
        	$query = "insert into spotlist values ('$spotid')";
        	//$result = mysql_query($query);
       		if ($result) { $spotcount ++; }
   	}
}

UPDATE:

Uninstalled SP2 on new server since old one didn't have it - no change.

Downgraded to PHP 5.2.1 from 5.2.3 on new server, to match old server - no change.

Pulled out the Ouiji board, burned some sweet grass and danced around the server - no change.

Can anybody even recomend a better place to find help with this?

We wiped the server and re-installed Server2003 without out IIS.

Installed WAMPserver5.

Same problem.

Oh and the same thing happens when accessing from/to localhost.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.