A couple of weeks ago, at a MySQL study group in Tokyo I
presented about various kinds of MySQL hacking techniques, such
as debugging with MS Visual Studio or gdb, tracing with DTrace,
writing information schema plugins, accessing tables from UDF and
storage engine API, and extending MySQL server code itself. This
90-minute session went successful. Nearly 100 people attended,
including famous MySQL developers such as Kazuho Oku-san and
Kentoku Shiba-san, having productive discussions with attendees
and quite a lot of people seemed interested in MySQL hacking. The
slides are written in Japanese, but sample codes can be
understandable and can be downloaded here.
What audiences were most interested in was accessing MySQL tables
directly from Plugins(currently UDFs) and storage engine API. I
showed a sample …
Yesterday was a good vacation day at my sister's house. As usual
with me, I don't seem able to have a completely computer-free
day. I did some work tasks, and then turned my attention to my
sister's network problems. She has a Mac, which is wired, and
several Windows laptops. The windows laptops weren't able to
connect to the Verizon-supplied DSL modem and router in-one. It
was set up for WEP (64-bit). I tried numerous times to get the
windows laptops working and found finally that that using 128-bit
encryption WEP solved the problem. Except for one computer. It
was an old Dell laptop with Windows. She wants this to be her
daughter's (my 11 year-old niece) computer. This laptop was
running extremely slow and could not connect to the Verizon
router, even when not encrypted. This particular laptop also uses
a PCI Linksys wireless card, so perhaps it's out of date enough
to not work with the Verizon router.
My sister asked me if I could …
We reported recently on Red Hat’s revenue growth and deferred revenue. One of the things I have been looking at recently is the slowdown in Red Hat’s growth in recent years, and the opportunities that the company has to improve that growth.
For some perspective it is worth noting that while Red Hat’s revenue has been growing steadily:
The rate of growth has been in decline for some time:
We have also noted (451 Group clients only) that the company will in …
[Read more]This is the first post on the brand spanking new MMM for MySQL Community Blog. Expect posts on new features for this great project. Expect user experiences.
So, your question is of course: what is MMM for MySQL and why haven't I heard of this before?
Well, MMM for MySQL is a project that strives to provide a HA Solution for MySQL, with automatic failover between multiple masters and slaves. If set up properly, you don't have to worry anymore over downtime for upgrading to a new version of MySQL, or a new version of your application (=> large alter tables, addition of indexes, etc.)
The project has recently reached it's version 2, which is a complete rewrite from scratch. We are now slowly seeing this being put into production, with some success stories making us happy already.
I won't make it too long here, but look forward to hear more from us!
I am sure many programmers writing network applications have their own abstracting layers hiding the differences between various I/O multiplex APIs, like select(2), poll(2), epoll(2), ... And of course, I am one among them. While writing mycached (see Mycached: memcached protocol support for MySQL for more information), I was at first considering of using libev for multiplexing socket I/Os. Libevent was not an option since it does not (yet) provide multithreading support.
But it was a great pain for me to learn how to use libev. I do not mean that its is an ugly product. In fact, I think that it is a very well written, excellent library. However, for me it was too much a …
[Read more]It is a well-known fact that the bottlenecks of MySQL does not exist in its storage engines, but rather in the core, for example, its parser and execution planner. Last weekend I started to wonder how fast MySQL could be if those bottlenecks were skipped. Not being able to stop my curiousity, I started adding memcached proctol support to MySQL as a UDF. And that is Mycached.
From what I understand, there are two advantages of using mycached (or the memcached protocol, in general) over using SQL. One is faster access. The QPS (queries per second) of mycached is roughly 2x compared to using SQL. The other is higher concurrency. As can be seen in the chart below, mycached can handle thousands of connections simultaneously.
…
[Read more]My first approach to diagnosing a performance problem is to start by trying to find the system’s bottleneck — the limiting factor in a series of events that causes a slowdown for the whole process.
As a DBA and MySQL specialist, one of the first things I look at is to see if we are bottlenecked on disk I/O. However, I don’t really like CPU iowait as a metric for measuring performance problems with disk I/O. Here’s a not-too-uncommon example of how the traditional iowait approach is very misleading on a multicore server.
Machine tested: Sun Fire X4140 w/8 disks RAID1+0 and 8 CPU cores.
1) Generate a large file (20G) onto the RAID partition
# dd if=/dev/urandom of=/data/sample.dat bs=1024
count=20000000
2) Generate single-threaded I/O activity by copying the file back
and forth
# while [ 1 -ne 0 …
In a Great Magnet moment Trent Lloyd posted an excellent write-up on how to recover from relay log name changes on the same day I was going to write up a procedure to send to a client who had a similar issue. Thanks Trent! The problem goes a bit deeper than server hostname changes because there have been a few changes to how mysql handles default log file names in 5.0
Prior to 5.0.38 the default log file name started with the hostname. The problem is, as Trent points out, that if the hostname of the server changes then mysql doesn’t generate default log file names correctly. The error message though is something like:
090825 18:54:53 [ERROR] Failed to open the relay log ‘/mysql/old_hostname-relay-bin.000015′ (relay_log_pos 107657)
There are a few strange things going on here. First if the relay-log index file default …
[Read more]I’m pleased to announce that the Kontrollsoft website now has a forum for support topics and feature requests. There are also sections for contributing to the projects, links to documentation, and some other general information. So, for all ideas and conversations about Kontrollbase and Kontrollkit – check out the new forums: http://kontrollsoft.com/forum
There are a number of operations whose cost will be different between a traditional row based dbms and a column based dbms. For this discussion, an abstract table with 20 columns (4 1-byte columns, 8 4-byte columns, 8 8-byte columns) will be used with 10 million rows. The row length is 100 bytes of data based on the data types listed.
Additional assumptions/approximations include; data is stored in blocks/pages of 8k bytes, that any overhead for row identifiers is negligible, the primary measure of cost is block touches, distribution of rows within blocks is contiguous, and that data is written once.
Comparison of block touches in support of inserts and deletions:
|
Insert Operation |
Row Based Cost |
… |