Simon Bennett

Web Developer

Web Development Simon Bennett

Category: Final Major Project

Initial Test Results

I have being paying around with the simplest of server implementations and today ran two though the benchmarker AB.

The results are not truly fair as they are running in VM’s and the host is my macbook.

To make sure the CPU is cooked in results and not just sat idling on a sleep a pi calculation is processed. This runs for how every long the time is set for.

$start = microtime(true);

	$limit = 0.1;

	$pi = 4; $top = 4; $bot = 3; $minus = TRUE;
	$accuracy = 10000000;

	for($i = 0; $i < $accuracy; $i++)
		$pi += ( $minus ? -($top/$bot) : ($top/$bot) );
		$minus = ( $minus ? FALSE : TRUE);
		$bot += 2;
		if(($start + $limit) < microtime(true))
	print "Pi ~=: " . $pi;

I am not sure if I like the way this works at the moment but the results are good. You can really see it maxing the cores out and in the number of concurrent connections = number of cores each result is matched. How ever if the number of concurrent requests are higher then the whole process slows down.

The plan is to do some request to some popular API's and find out there response times (withouth network time) and use the figures to base testing on. This will cut out the need for me to use a database connection or the like as that will be unfair.

HTTP Server

To make sure I document most of the things I am doing for my major project I have added a category to my blog. I will in time explain more about what I am doing.

This photo is my HTTP server that will be used to run my developed software. At the moment is compiling php with threads etc. The little cpu fan inside sounded like it was going to fly off so I have opened the side and will add the fan once the system is off (can’t turn off till after php has finished).


Note the desk fan as a temp measure.