MySQL Forums
Forum List  »  German

Re: i7 und mysql unter Debian?
Posted by: Simon Schmitt
Date: February 17, 2010 09:53AM

Unser PHP-Script sieht wie folgend aus:

<?
$dbhost = "localhost";
$dbuser = "test";
$dbpass = "test";
$dbname = "rainbows";

$connect = @mysql_pconnect($dbhost,$dbuser,$dbpass) or die("Connection Failure to Database");
if(!$connect);
@mysql_select_db($dbname);

$a = "a";
for($i = 0; $i < 10000000; $i++)
{
$INSERT = "INSERT INTO rainbow (orig, md5, sha, crypted, rot13) VALUES ('".$a."','".md5($a)."','".sha1($a)."','".crypt($a)."','".str_rot13($a)."')";
$QUERY = mysql_query($INSERT) or die(mysql_error());
$a++;
}
echo "fertig";
?>

Es stellt nur einen Versuch dar und wird nicht für irgendwelche weiteren Zwecke verwendet. Damit PHP auch ein wenig zu tun bekommt, dachten wir an diesen einfachen Aufbau.

Wird das Script also ein mal gestartet, ist ein Core zu 100% ausgelastet.
Wird das Script 2 mal gestartet, sind 2 Cores zu ca. 20-30% ausgelastet.
Starten wir das Script 3-8 mal, hat jeder Core etwa eine Auslastung von 5-15%.

Options: ReplyQuote


Subject
Views
Written By
Posted
4054
February 17, 2010 03:31AM
2114
February 17, 2010 03:47AM
1669
February 17, 2010 08:39AM
1724
February 17, 2010 09:32AM
Re: i7 und mysql unter Debian?
1767
February 17, 2010 09:53AM
1664
February 17, 2010 09:49AM
1498
February 18, 2010 04:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.