viernes, 27 de agosto de 2010

Centos 5x: Benchamark Tools.

Empezando a probar Xen 3.0 que viene por default con Centos 5.5, la 1ra maquina virtual tiene 5 GB de ram disco duro 30 GB.

Las maquinas virtuales las tengo dentro de la particion /opt del Dom-O en Raid-5.
el servidor tiene un Raid-1 para su operacion asi que vamos empezando a ver numeros de Raid-1 vs Raid-5 en el mismo servidor.

1er herramienta

unixbench: yum la localizo pero no di como usarla, asi que mejor la baje del sitio:

http://code.google.com/p/byte-unixbench/

1er corrida:

Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
make[1]: Leaving directory `/usr/app/bench/unixbench-5.1.2'
sh: 3dinfo: command not found

Version 5.1.2 Based on the Byte Magazine Unix Benchmark

Multi-CPU version Version 5 revisions by Ian Smith,
Sunnyvale, CA, USA
December 22, 2007 johantheghost at yahoo period com

1 x Dhrystone 2 using register variables 1 2 3
1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10
1 x Execl Throughput 1 2 34 5 6 7 8 9 10
1 x File Copy 1024 bufsize 2000 maxblocks 1 2 3
1 x File Copy 256 bufsize 500 maxblocks 1 2 3
1 x File Copy 4096 bufsize 8000 maxblocks 1 2 3
1 x Pipe Throughput 1 2 3 4 5 6 7 8 9
1 x Process Creation 1 2 3
1 x System Call Overhead 1 2 3 4 5 6 7 8 9
1 x Shell Scripts (1 concurrent) 1 2 3
1 x Shell Scripts (8 concurrent) 1 2 3
2 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10
2 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10
2 x Execl Throughput 1 2 3
2 x File Copy 1024 bufsize 2000 maxblocks 1 2 3
2 x File Copy 256 bufsize 500 maxblocks 1 2 3
2 x File Copy 4096 bufsize 8000 maxblocks 1 2 3
2 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10
2 x Pipe-based Context Switching 1 2 3 4 5 6 7 8
2 x Process Creation 1 2 3
2 x System Call Overhead 1 2 3 4 5 6 7 8 9 10
2 x Shell Scripts (1 concurrent) 1 2 3
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
CPU 1: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (5987.0 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
16:22:15 up 1 day, 20 min, 1 user, load average: 0.00, 1.32, 2.32; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Fri Aug 27 2010 16:22:15 - 16:50:38
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 14343571.7 lps (10.0 s, 7 samples)
Double-Precision Whetstone 2706.6 MWIPS (9.5 s, 7 samples)
Execl Throughput 1103.3 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 286790.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 68804.2 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 692436.7 KBps (30.0 s, 2 samples)
Pipe Throughput 390738.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 108240.3 lps (10.0 s, 7 samples)
Process Creation 3412.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 2697.0 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 742.3 lpm (60.1 s, 2 samples)
System Call Overhead 486911.1 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 14343571.7 1229.1
Double-Precision Whetstone 55.0 2706.6 492.1
Execl Throughput 43.0 1103.3 256.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 286790.7 724.2
File Copy 256 bufsize 500 maxblocks 1655.0 68804.2 415.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 692436.7 1193.9
Pipe Throughput 12440.0 390738.9 314.1
Pipe-based Context Switching 4000.0 108240.3 270.6
Process Creation 126.0 3412.8 270.9
Shell Scripts (1 concurrent) 42.4 2697.0 636.1
Shell Scripts (8 concurrent) 6.0 742.3 1237.1
System Call Overhead 15000.0 486911.1 324.6
========
System Benchmarks Index Score 512.5

------------------------------------------------------------------------
Benchmark Run: Fri Aug 27 2010 16:50:38 - 17:19:11
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables 28935337.8 lps (10.0 s, 7 samples)
Double-Precision Whetstone 5738.3 MWIPS (9.9 s, 7 samples)
Execl Throughput 2739.5 lps (29.5 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 193524.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 51916.1 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 670978.9 KBps (30.1 s, 2 samples)
Pipe Throughput 888673.8 lps (10.0 s, 7 samples)
Pipe-based Context Switching 222862.6 lps (10.0 s, 7 samples)
Process Creation 4855.8 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5452.4 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 794.9 lpm (60.1 s, 2 samples)
System Call Overhead 946134.2 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 28935337.8 2479.5
Double-Precision Whetstone 55.0 5738.3 1043.3
Execl Throughput 43.0 2739.5 637.1
File Copy 1024 bufsize 2000 maxblocks 3960.0 193524.2 488.7
File Copy 256 bufsize 500 maxblocks 1655.0 51916.1 313.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 670978.9 1156.9
Pipe Throughput 12440.0 888673.8 714.4
Pipe-based Context Switching 4000.0 222862.6 557.2
Process Creation 126.0 4855.8 385.4
Shell Scripts (1 concurrent) 42.4 5452.4 1286.0
Shell Scripts (8 concurrent) 6.0 794.9 1324.8
System Call Overhead 15000.0 946134.2 630.8
========
System Benchmarks Index Score 776.7

maatkit.

Nos pide:

error: Failed dependencies:
perl(DBD::mysql) >= 1.0 is needed by maatkit-6839-1.noarch igual a perl-DBD-mysql
perl(Term::ReadKey) >= 2.10 is needed by maatkit-6839-1.noarch igual a
perl-TermReadKey

Listo con esto ya podemos instalarlo.

sysbench

Este ya viene listo de los repos, asi que un yum y listo.

Esta herramienta si es bien usando para probar el desempeño de MySQL, nosotros para iniciar vamos crear
2 bases de datos, una para el engine myisam y la otra para innodb:

sbmyisam
sbinnodb

Nos vamos a la consola de MySQL y las creamos:


mysql> create database sbmyisam;
Query OK, 1 row affected (0.00 sec)


mysql> create database sbinnodb;
Query OK, 1 row affected (0.00 sec)

Listo, lo que sigue es cargarla de datos con sysbench, vamos iniciando por Myisam, para esto nos tenemos que salir de la consola de mysql e irnos a nuestra consola.

Vamos a cargarle 100,000 registros:

sysbench --test=oltp --db-driver=mysql --mysql-db=sbmyisam --mysql-table-engine=myisam --mysql-host=127.0.0.1 --mysql-user=root --mysql-password=mysql --mysql-table-engine=myisam --oltp-table-size=100000 --mysql-socket=/var/run/mysqld/mysqld.pid prepare
sysbench 0.4.10:  multi-threaded system evaluation benchmark

Creating table 'sbtest'...
Creating 100000 records in table 'sbtest'...

El password es ficticio, ustedes ahi pongan el que esten usando, ahora viene para innodb:

sysbench --test=oltp --db-driver=mysql --mysql-db=sbinnodb --mysql-table-engine=innodb --mysql-host=127.0.0.1 --mysql-user=root --mysql-password=mysql --mysql-table-engine=myisam --oltp-table-size=100000 --mysql-socket=/var/run/mysqld/mysqld.pid prepare
sysbench 0.4.10:  multi-threaded system evaluation benchmark

Creating table 'sbtest'...
Creating 100000 records in table 'sbtest'...

En ambos casos crea la tabla con el mismo nombre "sbtest".

Corroboramos que ambas BD tenga los 10,000 registros creados:


mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| sbinnodb           |
| sbmyisam           |
| test               |
+--------------------+
5 rows in set (0.00 sec)

mysql> use sbmyisam;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select count(*) from sbtest;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (0.00 sec)

mysql> use sbinnodb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select count(*) from sbtest;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (0.00 sec)

Ahi los tenemos en cada una.




No hay comentarios: