May 25, 2012

Post: Troubleshooting MySQL Memory Usage

… most painful troubleshooting tasks with MySQL is troubleshooting memory usage. The problem usually starts like this – you have configured MySQL to use reasonable global… running MySQL in wild. I also wanted to share some troubleshooting techniques I use. Plot Memory Usage First I would like to see MySQL memory…_heap_table_size variable which allows you to limit size of MEMORY tables (the limit applies both to implicit and explicit ones) but…

Post: MySQL Server Memory Usage

… to worry about memory usage are quite understandable. If you configure MySQL Server so it uses too small amount of memory it will likey… memory needed for OS, File Cache and other applications. For 32bit envinronment you also should keep 32bit limits into account and probably limit

Post: MySQL Limitations Part 4: One thread per connection

… processes that communicate through shared memory or other means. It’s cheap to create a connection to MySQL, because it just requires… server. That increases the overhead from thread scheduling, and potentially memory usage as well. I feel like I’m forgetting some reasons… why I listed those as major limitations. And because MySQL is a multi-threaded database for Web usage that tends to be used…

Post: Dynamic row format for MEMORY tables

… features in the MEMORY storage engine (also known as HEAP) in MySQL has been one of the long-standing limitations caused by the… community to remove this limitation. In 2008 Igor Chernyshev of eBay implemented true-VARCHAR support for MEMORY tables for MySQL 5.0. Although…: 10069048 kB Here we can see that the performance and memory usage is about the same for both row formats. (Speaking very…

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

…’s the formula to compute mysqld’s worst-case maximum memory usage?” Various formulas are in wide use, but none of them… * 1024 * 100); Query OK, 0 rows affected (2.34 sec) mysql> select get_lock(@a, 1); +—————–+ | get_lock(@a, 1) | +—————–+ | 1… compute the maximum possible memory usage, and there cannot be because there are some things that have no defined limits. It’s not…

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

… The amount of resources system has will place a limit on amount of queries system can ran, for …#14 and #15 here is kernel and user CPU usage of MySQL process in 1/100 of the second. (…use this information is to compare systems with different memory amount having same workload. You will often see …

Post: MySQL on Amazon RDS part 1: insert performance

…RDS) is a cloud-hosted MySQL solution. I’ve had some clients hitting performance limitations on standard EC2 servers…dedicated to RDS, not shared with the general usage of AWS as you get on normal EC2… is listed as “High-Memory Quadruple Extra Large DB Instance: 68 GB of memory, 26 ECUs (8 virtual…

Post: Memory allocation in Stored Function

… As you see MySQL ate 5GB of memory in 85 sec. That makes things clearer. As I understand MySQL allocates memory in each call of Stored Function, but de-allocates it only at the end of statement. This makes usage of Stored Function very limited from my point of view. And, yes, if…

Post: 3 ways MySQL uses indexes

…mistakes come from missing one very important MySQL limitation – once MySQL runs into the interval range it…MySQL uses single index – there are more complex rules of how indexes will be used if you look at multiple indexes usage…up queries even if data is in memory. If MySQL is only reading index and …

Post: 10+ Ways to Crash or Overload MySQL

… cases you can use result overload to make MySQL to consume so much memory so it will swap badly until it runs… is to get enough memory allocated to get to address space limit and MySQL will crash when one of internal memory allocations would unexpectedly… unprivileged user which allows to run queries with uncontrolled resource usage. Host Block You can have given client host blocked from…