May 25, 2012

Post: InnoDB memory allocation, ulimit, and OpenSUSE

… failed malloc() in ut_malloc_low() in ut/ut0mem.c inside InnoDB source code. InnoDB wraps the majority of its memory allocations in ut_malloc_low(), so to get an idea of the pattern of requested allocations I added a…. I tested it with allocating 70 GB concurrently in each process so as to overrun physical memory + swap. Both allocations were successful, one…

Post: Helgrinding MySQL with InnoDB for Synchronisation Errors, Fun and Profit

… bytes inside a block of size 664 alloc‘d ==9090==    at 0x4C28FDF: malloc (vg_replace_malloc.c:236) ==9090==    by 0x6B70A62: mem_heap… block of size 800000 alloc‘d ==9090==    at 0x4C28FDF: malloc (vg_replace_malloc.c:236) ==9090==    by 0x6BE309B: ut_malloc (ut0mem.c:106) ==9090…, I’d consider backporting and using MySQL 5.5 atomic operation primitives with proper memory barriers, so that there is no need…

Post: How is join_buffer_size allocated?

…cache->length); 14272 if (!(cache->buff=(uchar*) my_malloc(size,MYF(0)))) 14273 DBUG_RETURN(1); /* …as x2 join…. That should try to allocate 1GB of memory for each join. If you execute this and nothing bad happens, you might be seeing this bug: http://bugs.mysql

Post: Ultimate MySQL variable and status reference list

…the amazing MySQL manual, especially the option and variable….commanual shared_memoryblogpercona.commanual shared_memory_base_nameblogpercona.commanual show_slave_…_sizeblogpercona.commanual tmpdirblogpercona.commanual transaction_alloc_block_sizeblogpercona.commanual transaction_isolationblogpercona….

Post: Read Buffers, mmap, malloc and MySQL Performance

… up with 2 posts on mmap allocation. Indeed allocating with mmap is much slower than allocating from memory memory pool which process already “owns” and… tune you malloc settings so more buffers are allocated from the pools rather than mmap. This though will at least increase memory consumptions… in the pool you could just grab one having allocation very quick. Also MySQL should get smarter in terms of which buffer…

Post: How much memory Innodb Dictionary can take ?

… limit. So how much memory can it really take ? Here is some production stats from real system: mysql> select count(*) from INNODB…) In this case The memory stats from SHOW INNODB STATUS look like: Total memory allocated 1101004800; in additional pool allocated 0 Internal hash tables… not included in “Total Memory Allocated” in SHOW INNODB STATUS any more, as that allocations were moved to use malloc() and so Innodb does…

Post: MySQL, AIX5L and malloc()

… run MySQL database on AIX 5L operating system. You compiled it successfully, configured and.. unluckily database didn’t start due to memory allocation…, to make your MySQL working fine: export LDR_CNTRL=’MAXDATA=0×80000000′ It allows database to allocate 2GB of memory ( 8*256MB…

Post: How much memory can MySQL use in the worst case?

allocate it. innodb_additional_mem_pool_size is just a handy way to avoid repeated malloc()… stored code (triggers, stored routines, etc) uses memory to execute; so do temporary tables. The…100); Query OK, 0 rows affected (2.34 sec) mysql> select get_lock(@a, 1); +—————–+ | get_lock(@a, 1) …

Comment: To UUID or not to UUID ?

… on the Malloc tests. It is interesting it changes well with Google Malloc as in fact we’ve benchmarked number of malloc alternatives… not surprising especially as MySQL does internal memory management. On this high query rate however even few per thread allocations MySQL does may matter.

Comment: Impact of the number of idle connections in MySQL

… really expensive memory sanity check that has quadratic cost in the number of active malloc() allocations. (Note that a “debug build” in MySQL is… you know of any particular lists of idle connections that MySQL needs to traverse?