Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Archive for June, 2013

Aside

MariaDB Memory Footprint

Recently, I’ve upgraded the database of this blog from MySQL to MariaDB.

For those of you who are not aware, MariaDB is a fork from MySQL by the original founder of MySQL.
MariaDB 5.5 is fully compatible with MySQL 5.5 and can be replaced by “dropping in” directly over MySQL.

What I noticed after upgrading to MariaDB was that the memory usage shot up to close to my VPS limit.
As my VPS has limited memory, this sudden memory increase might create problems down the road.

After investigating the possible causes, it was traced to the new database engine introduced in MariaDB, the Aria Storage Engine.

According to the Knowledge Base, the default buffer size is 128M, a pretty big number for a VPS with only 512M of available memory.
Since I’m still using the ISAM engine and have no need to use the Aria engine, it should be turned off to reduce the memory usage.
However, as the storage engine is an integral part of the DBMS, it couldn’t be turned off, so the next best thing would be to tune the config in my.cnf

[mariadb]
aria_pagecache_buffer_size = 512k
aria_sort_buffer_size = 16k

There, after tuning the buffer size to 512K and 16K, the memory usage is back to normal.