Posts Tagged ‘performance’

Convert MYSQL tables to INNODB script

Tuesday, July 12th, 2011

If you want to convert MYSQL tables to INNODB use the following script:

mysql -u root -p -e "SHOW TABLES IN DATABASE-NAME;" | tail -n +2 | xargs -I '{}' echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql
and then run:
perl -p -i -e 's/(search_[a-z_]+ ENGINE=)INNODB/\1MYISAM/g' alter_table.sql

Replace “DATABASE-NAME” with your database name. You also need root access (preferably).

How fast is SATA disk in Linux?

Friday, June 12th, 2009

To find out how fast is your HDD in linux use:


hdparm -tT /dev/sda

This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test. Here is for loop to run test 3 time in a row:


for i in 1 2 3; do hdparm -tT /dev/sda; done