myisam vs innodb

Mo Sep 18 17:21:56 CEST 2006

Xgl and Compiz for Gnome under Debian unstable

Installing XGL & Compiz on Debian (even unstable) still is a pain in the ass. The xserver-xgl deb package has not yet arrived so the easiest way is to abuse some ubuntu packages:

~# su -
deathbird:~# cat >> /etc/apt/source-list
deb http://www.beerorkid.com/compiz dapper main
deb http://media.blutkind.org/xgl/ dapper main
deb http://ubuntu.compiz.net/ dapper main
^D
( That last character stands for hitting ctrl-d, just in case you did not recognize that. )
deathbird:~# apt-get update
deathbird:~# apt-get install xserver-xgl compiz libsvg libsvg-cairo cgwd \ 
 cgwd-themes compiz-gnome xfonts-75dpi
deathbird:~# cd /etc/X11
deathbird:/etc/X11# mv X Xorg
deathbird:/etc/X11# ln -s /usr/bin/Xgl X
deathbird:/etc/X11# logout
~# cat >> ~/.xsession
cgwd &
compiz gconf decoration wobbly fade minimize cube rotate zoom \ 
scale move resize place menu switcher water --replace &
^D
~# chmod +x ~/.xsession

I also had to change my /etc/X11/xorg.conf configuration as they seem to have moved some fonts and Xgl won't run without them (there are a bazillion ways to work around this). Look for fonts and change their path to /usr/share/fonts so that they more or less match these lines:

Section "Files"
    FontPath        "/usr/share/fonts/X11/misc"
    FontPath        "/usr/share/fonts/X11/misc/:unscaled"
    FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath        "/usr/share/fonts/X11/Type1"
    FontPath        "/usr/share/fonts/X11/100dpi"
    FontPath        "/usr/share/fonts/X11/75dpi"
EndSection

In case you also use gdm you can change the gdm setting in /etc/gdm/gdm.conf. Look for 0=Standard and replace that line with:

#0=Standard
0=Xgl
[server-Xgl]
name=Xgl
command=/usr/X11R6/bin/Xgl :0 -fullscreen -ac -br -accel glx:pbuffer -accel xv:fbo
( This line works for nvidia cards.. )

When you're done your desktop MIGHT look like this:

XGL


Posted by iso | Permanent Link | Tags: mumbo jumbo, nerd stuff, linux | comments >>

Mo Sep 18 15:29:53 CEST 2006

myisam vs innodb

Very quick'n'dirty almost unuseable benchmark of mysql 5 myIsam vs. innoDB tables. In these rudimentary tests (which btw have no correlations with reality) myIsam is about 2.7 times as fast as innoDB is - or innoDB is even 2.7 times as slow as myIsam is, depending on your point of view..
MyIsam lacks support of transactions and locks tables instead of rows, so you should use innoDB anyway - although it is slower and needs more space.

iso@deathbird:~$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.24a-Debian_3-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database testeimer;
Query OK, 1 row affected (0.04 sec)

mysql> use testeimer;
Database changed

mysql> create table `testmyisam` ( `id` bigint auto_increment, 
`title` varchar(128), primary key (`id`)) type=MyISAM charset=utf8;
Query OK, 0 rows affected, 1 warning (0.02 sec)

mysql> create table `testinnodb` ( `id` bigint auto_increment, 
`title` varchar(128), primary key (`id`)) type=innoDB charset=utf8;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> Bye
iso@deathbird:~$ vi testme.sql
iso@deathbird:~$ head -1 testme.sql
INSERT INTO `testmyisam` ( `title` ) values ( 'kapsobor' );
iso@deathbird:~$ wc testme.sql
 100000 1000000 6000000 testme.sql
iso@deathbird:~$ time mysql -u root testeimer < testme.sql

real    1m43.189s
user    0m8.269s
sys     0m3.572s
iso@deathbird:~$ vi testme.sql
iso@deathbird:~$ head -1 testme.sql
INSERT INTO `testinnodb` ( `title` ) values ( 'kapsobor' );
iso@deathbird:~$ wc testme.sql
 100000 1000000 6000000 testme.sql
iso@deathbird:~$ time mysql testeimer < testme.sql

real    4m48.227s
user    0m9.785s
sys     0m3.720s
iso@deathbird:~$ time mysql testeimer -e "update testmyisam set title='eimersaufen'";

real    0m4.308s
user    0m0.020s
sys     0m0.004s
iso@deathbird:~$ time mysql testeimer -e "update testinnodb set title='eimersaufen'";

real    0m7.569s
user    0m0.016s
sys     0m0.012s
iso@deathbird:~$ time mysql testeimer -e "select count(*) from testmyisam"
+----------+
| count(*) |
+----------+
|   100000 |
+----------+

real    0m0.118s
user    0m0.020s
sys     0m0.000s
iso@deathbird:~$ time mysql testeimer -e "select count(*) from testinnodb"
+----------+
| count(*) |
+----------+
|   100000 |
+----------+

real    0m0.572s
user    0m0.024s
sys     0m0.004s
iso@deathbird:~$ time mysql testeimer -e "select count(id) from testmyisam"
+-----------+
| count(id) |
+-----------+
|    100000 |
+-----------+

real    0m0.110s
user    0m0.024s
sys     0m0.004s
iso@deathbird:~$ time mysql testeimer -e "select count(id) from testinnodb"
+-----------+
| count(id) |
+-----------+
|    100000 |
+-----------+

real    0m0.307s
user    0m0.020s
sys     0m0.004s
iso@deathbird:~$ time mysql testeimer -e "update testmyisam set title=title + 'kapsobor'";

real    0m8.362s
user    0m0.016s
sys     0m0.008s
iso@deathbird:~$ time mysql testeimer -e "update testinnodb set title=title + 'kapsobor'";

real    0m10.894s
user    0m0.024s
sys     0m0.008s

Posted by iso | Permanent Link | Tags: nerd stuff, mysql, linux | comments >>