Monthly Archives - May 2006

InnoDB memory usage

There are many questions how InnoDB allocates memory. I’ll try to give some explanation about the memory allocation at startup.
Some important constants:
NBLOCKS=count of block in innodb_buffer_pool = innodb_buffer_pool_size / 16384
OS_THREADS= if (innodb_buffer_pool_size >= 1000Mb) = 50000
else if (innodb_buffer_pool_size >= 8Mb) = 10000
else = 1000 (it’s true for *nixes, for Windows there is a bit […]

Read more

MySQL INSERT ON DUPLICATE KEY UPDATE and counters

MySQL INSERT ON DUPLICATE KEY UPDATE is very powerful but often forgotten MySQL feature. It was introduced in MySQL 4.1 but I still constantly see people unaware of it.
Myself I like this feature big deal because it is designed in truly MySQL style – very efficient solution for frequent task while keeping it beautiful […]

Read more

Jeremy Cole on MySQL Replication

Jeremy Cole recently posted very nice post about MySQL Replication Performance. There are however few points I should comment on.

Jeremy Speaks about MyISAM and Innodb in the same terms, in fact they are quite different for Replication. As you probably know MyISAM uses buffered IO so if master crashes you’re out of sync […]

Read more

How Web Services world affect LAMP Stack

In connection to my previous post I was thinking how Web 2.0 with its massive use of Web Services affect LAMP Stack ? Well actually there are serious difference both for client and server application development which you might want to take into account.
If you’re developing Web Service Server application you will most likely […]

Read more

Speedup your LAMP stack with LigHTTPD

Apache Web server could frequently be bottleneck for your LAMP stack, or you might be wasting resources on your web servers. The problem with Apache server comes from “client per process” architecture which you have to stick to at least for dynamic content served by PHP or ModPerl. With “client per process” you end […]

Read more

Group commit and XA

Returning to post Group commit and real fsync I made several experiments:
I ran sysbench update_key benchmarks without —log-bin, with —log-bin, and with —log-bin and —innodb-support-xa=0 (default value is 1). Results (in transactions / sec)

threads
without —log-bin
—log-bin
—log-bin and
—innodb_support-xa=0

1
1218.68
614.94
1010.44

4
2686.36
667.77
1162.60

16
3993.59
666.14
1161.56

64
3630.55
665.18
1151.36

So we can see group commit is not only broken when XA is enabled but also if XA […]

Read more

MySQL Server Memory Usage

Every so often people ask me the question how should they estimate memory consumption by MySQL Server in given configuration. What is the formula they could use.
The reasons to worry about memory usage are quite understandable. If you configure MySQL Server so it uses too small amount of memory it will likey perform suboptimally. […]

Read more