EmergencyEMERGENCY? Get 24/7 Help Now!

MyISAM concurrent insert

 | June 13, 2006 |  Posted In: Benchmarks, Insight for DBAs

Arjen posted a good note about MyISAM concurrent-insert features, though I should mention concurrent-insert can be cause of scalablity and peformance problems on SMP boxes, especially on queries processing range-queries. The reason of problems is POSIX read-write locks, which are used to protect key_buffer from concurrent changes and called for each processed row. More info […]

Read More

Quick look at Ubuntu 6.06

 | June 13, 2006 |  Posted In: Benchmarks

There are a lot of talks around new coming Ubuntu 6.06, so I decided to make quick benchmarks. I used sysbench 0.4.6 oltp-read-only workload with 1000000 rows against InnoDB and MyISAM tables. Such workload is CPU-bound and allows to compare CPU / OS if we are using the same version of MySQL. So I used […]

Read More

InnoDB thread concurrency

 | June 5, 2006 |  Posted In: Insight for DBAs

InnoDB has a mechanism to regulate count of threads working inside InnoDB. innodb_thread_concurrency is variable which set this count, and there are two friendly variables innodb_thread_sleep_delay and innodb_concurrency_tickets. I’ll try to explain how it works. MySQL has pluginable architecture which divides work between mysql common code (parser, optimizer) and storage engine. From storage engine’s point […]

Read More

InnoDB page size

 | June 4, 2006 |  Posted In: Insight for DBAs

As maybe you know InnoDB uses hard page size 16Kb for datafiles and for buffer pool. However this size can be changed if you need it for your workload. go to file innobase/include/univ.i, lines:

UNIV_PAGE_SIZE is page size (as you see – default value 16Kb). Possible values for UNIV_PAGE_SIZE is 8K, 16K, 32K, 64K. […]

Read More

Indexes in MySQL

 | June 2, 2006 |  Posted In: Insight for DBAs

MySQL does not always make a right decision about indexes usage. Condsider a simple table:

; 250001 (V1)

; 83036 (V2) (execution time = 110 ms) That is index selectivity by condition (ID1=1) is V2/V1 = 0.3321 or 33.21% It is said (e.g. book “SQL Tuning”) if selectivity over 20% then a full table […]

Read More

InnoDB memory usage

 | May 30, 2006 |  Posted In: Insight for DBAs

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 […]

Read More

MyISAM mmap feature (5.1)

 | May 26, 2006 |  Posted In: Insight for DBAs

As you know MyISAM does not cache data, only indexes. MyISAM assumes OS cache is good enough and uses pread/pwrite system calls for reading/writing datafiles. However OS is not always good in this task, my benchmarks show Linux/Solaris aren’t scalable on intensive pread calls (I believe the same for Windows, but I did not test […]

Read More

Group commit and XA

 | May 19, 2006 |  Posted In: Insight for DBAs

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 […]

Read More

Mess with innodb_thread_concurrency

 | May 12, 2006 |  Posted In: Insight for DBAs

In MySQL 5.0.19 the meaning of innodb_thread_concurrency variable was changed (yeah, again). Now innodb_thread_concurrency=0 means unlimitied count of concurrent threads inside InnoDB. It’s logical, but there was long way. In MySQL versions below 5.0.8 for unlimited threads you had to set innodb_thread_concurrency over 500 (and default value for innodb_thread_concurrency was 8 ). Starting with MySQL […]

Read More