The CAP Theorem has become a convenient excuse for throwing data
consistency under the bus. It is automatically assumed that every
distributed system falls prey to CAP and therefore must sacrifice
one of the three objectives, with consistency being the
consistent fall guy. This automatic assumption is simply false. I
am not debating the validity of the CAP Theorem, but instead
positing that the onset of CAP limitations—what I call the CAP
event horizon—does not start as soon as you move to a second
master database node. Certain approaches can, in fact, extend the
CAP event horizon.
Physics tells us that different properties apply at different
scales. For example, quantum physics displays properties that do
not apply at larger scale. We see similar nuances in scaling
databases. For example, if you are running a master slave
database, using synchronous replication with a single slave is no
problem. Add nine more slaves and it slows the …
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
Given the popular response from my first lesson in improving scalability where I detailed simple ways to eliminate unnecessary SQL, let me share another common bottleneck with MySQL scalability that can be instantly overcome.
Analyzing the writes that occur on a system can expose obvious potential bottlenecks. The MySQL Binary Log is a wealth of information that can be mined. Simple DML Counts per table can be achieved by a single line command.
Let’s look at the following example output of a production system:
mysqlbinlog /path/to/mysql-bin.000999 | \ grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e "^alter" | \ cut -c1-100 | tr '[A-Z]' '[a-z]' | \ sed -e "s/\t/ /g;s/\`//g;s/(.*$//;s/ set …[Read more]
It can be very easy to improve scalability with a MySQL server by a few simple rules. Here is one of them.
“The most efficient way to improve an SQL statement is to eliminate it”
There are numerous ways to eliminate SQL statements, however before I give a classic example that I’ve observed again with a client, let me explain the basic premise of why this improves scalability?
The MySQL kernel can only physically process a certain number of SQL statements for a given time period (e.g. per second). Regardless of the type of machine you have, there is a physical limit. If you eliminate SQL statements that are unwarranted and unnecessary, you automatically enable more important SQL statements to run. There are numerous other downstream affects, however this is the simple math. To run more SQL, reduce the number of SQL you need to run.
Here is the output of a small sample of analyzed TCP/IP …
[Read more]I’m not sure how many of this blog’s readers are likely to be aware of VoltDB. It is one of the systems that I think could be poised to dispel the notion that SQL (or the relational model) is somehow inherently unscalable. Here’s a blog post explaining how VoltDB does transaction ordering and replication.
Related posts:
- Why MySQL replication is better than mysqlbinlog for recovery
- What are your favorite MySQL replication filtering rules?
- …
Mat Keep’s blog post on InnoDB-vs-MyISAM benchmarks that Oracle recently published prompted me to do some mathematical modeling of InnoDB’s scalability as the number of cores in the server increases. Vadim runs lots of benchmarks that measure what happens under increasing concurrency while holding the hardware constant, but not as many with varying numbers of cores, so I decided to use Mat Keep’s data for this. The modeling I performed is Universal Scalability Law modeling, which can predict both software and hardware scalability, depending on how it is used.
In brief, the benchmarks are sysbench’s read-only and read-write tests, and the server has two Intel SSDs, 64GB of memory, and 4 x 12-core …
[Read more]Recently am part of Zynga‘s database team as I was pretty much impressed with company’s database usage. As everyone knows how popular Zynga games like Farmville, Cafe World, Mafia Wars,[...]
Googling around, I came across Bradford Cross' article, Big Data Is Less About Size, And More About
Freedom. Bradford writes, " The scale of data and
computations is an important issue, but the data age is less
about the raw size of your data, and more about the cool stuff
you can do with it."
Even though the article makes some good points, I'm not sure I
can agree with Bradford's point of view here. As an architect,
when I think in terms of Big Data, the ability to do "cool stuff"
is probably the last thing that crosses my mind. Big Data, to me,
is about ensuring constant response time as the data grows in
size without sacrificing functionality.
What do you think Big Data is about? Is it merely about being
able to do 'cool stuff' with your data? Is it about ensuring
constant access/response times? Or is it about something else?
I'm eager …
I wrote this as a reply to Does Lean Startup Methodology Apply to Consumer
Startups?" However, due to comment length restrictions on
that blog, I am posting my comment here and welcome your
thoughts.
"An enterprise will pilot products and iterate with a vendor:
Let's run a 6 month consulting engagement/pilot to evaluate if
this new database solves the problem."
Only an enterprise where there is a major disconnect between
management and engineering will opt for this path. In enterprises
where needed data I/O patterns are understood, taking such path
may spell disaster.
The primary problem with the 'lean
startup' methodology that I see is that it blindly preaches
entrepreneurs to close their eyes, cut corners and just get the
product …
Ewen and I have just published Percona’s latest white paper, Forecasting MySQL Scalability with the Universal Scalability Law. This is essentially a streamlined walk-through of Dr. Neil J. Gunther’s book Guerrilla Capacity Planning, with examples to show how you can apply it to MySQL servers.
One thing alluded to in the paper is extracting the necessary metrics from network traffic. I had this idea after studying the data in Linux’s /proc/diskstats file. It turns out that two simple metrics can provide amazingly rich insight into system performance and scalability, in combination with Little’s Law and queueing theory. These are the busy time and the total time that requests were resident in the system. There are different terms for the latter, but in MySQL we’d call it query response time. After studying these for a few months, I’m so …
[Read more]Even though Data warehouse is picking very rapidly in the last year or so, but few companies who are already made a right mark in the right time could not[...]