Database Power Savings

I think this is a pretty amusing tidbit. A few weeks ago I noticed a MySQL database taking a little more CPU than expected. Nothing dramatic. This is a small VM on a host running several and as the graph shows it doesn’t even break 25% capacity.

After about an hour I was able to reduce the CPU consumption considerably by updating, making sure indexes were optimal etc. etc. Nothing incredibly dramatic. Hardly a herculean task.

Now a week later I can clearly see the power consumption dropped a little bit on this particular host as a result of my optimization work.

Just goes to show, even if you run stuff in house and have extra computational power handy, it can add up.

1W of electricity @ $0.17 running 24 x 7 x 365 = $1.50/year. Literally a measurable improvement.

Open Source Software

MySQL To Percona Server Gottcha

Decided to replace the aging MySQL 5.1.x on a CentOS Box with a newer Percona Server 5.6. First step was to update MySQL 5.1 to 5.5. This went relatively smoothly after I figured out some mySQL transaction kung-fu and ran mysql_upgrade. Step two was to replace it with Percona Server. It installed fine. Almost to simple. So naturally I ran:

etc/init.d/mysql start

which resulted in a dreaded:

Starting MySQL (Percona Server).... ERROR! The server quit without updating PID file (/var/lib/mysql/

After a few minutes of pouring through the logs I noticed this little nugget:

2015-04-25 19:18:16 18234 [ERROR] /usr/sbin/mysqld: unknown variable 'table_cache=7K'

Apparently around MySQL 5.1.3 they replaced table_cache with table_open_cache. A simple rename in my.ini, and we’re on our way. Now running a little faster thanks to some much newer DB binaries.

Open Source

MySQL Going Closed Source

I was a little concerned when MySQL AB was purchased by Sun, however Sun had a pretty long history with open source and mostly seemed to know how to balance things. When Sun was purchased by Oracle, I was quite uneasy knowing Oracle has a way of killing everything that isn’t Oracle. Seems like that time has finally come. Thankfully there are some forks of MySQL already. It might be time to start reading up and making sense of them.

Open Source Programming

DBSlayer + Node.js