Archive for the ‘relational’ Category

Benchmarking MySQL ACID performance with SysBench

Июнь 21st, 2010

A couple of question I get a lot from MySQL customers is “how will this hardware upgrade improve my transactions per second (TPS)” and “what level of TPS will MySQL perform on this hardware if I’m running ACID settings?” Running sysbench against MySQL with different values for per-thread and global memory buffer sizes, ACID settings, and other settings gives me concrete values to bring to the customer to show the impact that more RAM, faster CPUs, faster disks, or cnf changes have on the server. Here are some examples for a common question: “If I’m using full ACID settings vs non-ACID settings what performance am I going to get from this server?”

Let’s find out by running sysbench with the following settings (most are self explanatory – if not the man page can explain them):

  • sysbench –test=oltp –db-driver=mysql –oltp-table-size=1000000 –mysql-engine-trx=yes –oltp-test-mode=complex –oltp-read-only=off –oltp-dist-type=special –max-requests=0 –num-threads=8 –max-time=120 –init-rng=on run

MySQL Settings:

In the first test MySQL is set to the following ACID related settings. This will give us results for TPS performance without full ACID compliance – very common settings on a server that is handling blogs, ad serving, general business websites, and other roles where full ACID is not required and performance is valued over the benefits of full ACID. These are important settings when we look at the difference in performance when we change to full ACID in the second test.

  • innodb_flush_log_at_trx_commit = 0
  • sync_binlog=0
  • transaction-isolation=REPEATABLE-READ

System configuration and InnoDB buffer pool size:

  • XEON E5345 Series 2.33ghz 8-core, 16GB RAM, Local SATA 7.2K disks
  • innodb_buffer_pool_size = 10G

Full result set from sysbench:

Summary OLTP test statistics:

  • queries performed:
  • transactions:                        172426 (1436.83 per sec.)
  • read/write requests:                 3276664 (27304.51 per sec.)
  • other operations:                    344882 (2873.91 per sec.)

Take away results:

We can simplify the results by looking at the following TPS results for this non-ACID test:

  • transactions:                        172426 (1436.83 per sec.)

Let’s go ahead and run the test again with different ACID settings. This will give us the TPS results for full ACID compliance:

  • innodb_flush_log_at_trx_commit = 1
  • sync_binlog=1
  • transaction-isolation=REPEATABLE-READ

We get the following results for TPS:

  • transactions:                     3197   (26.58 per sec.)
  • read/write requests:                 60743  (505.04 per sec.)
  • other operations:                    6394   (53.16 per sec.)

Final Results:

So as you can see the difference between full ACID settings and not (on the same server with only those values on the cnf being changed) results in a huge difference in performance on this standard database server. We can now hand this data to the customer and they will know what impact the settings will have on their application’s performance and what to expect when running full ACID vs non-ACID.

More info on using sysbench here: http://sysbench.sourceforge.net


PlanetMySQL Voting: Vote UP / Vote DOWN

How to install MongoDB on CentOS 5.4 / RHEL5 and interface with PHP 5

Май 12th, 2010

If you’ve been reading up on the various NoSQL offerings and have wanted to try out one but don’t know how to get started, this is one of the easiest ways. I chose MongoDB for this example because I’m going to start using it for a project that needs features that MySQL isn’t as fast at: namely denormalized data with billions of rows. MongoDB has plenty of drivers for other scripting and high-level languages but I’ll focus on the PHP driver today. If there is interest I can do a write up on Python usage later. This example is limited to CentOS, Fedora, and Redhat 5 servers that use the yum package management system. For more information you can reference their download page: http://www.mongodb.org/display/DOCS/Downloads

First install the prerequisites:

  • sudo yum install gcc php php-pear

Then install the mogo php extension via pecl and add the extension to the ini file. (Increase the php.ini memory_limit to 32M if necessary). Then we restart apache to have the extension loaded. You can check your extensions via the phpinfo(); command in php.

  • sudo pecl install mongo
  • sudo echo “extension=mongo.so” >> /etc/php.ini
  • sudo /etc/init.d/httpd restart

For the last part we add the yum repo and get the actual MongoDB server and client installed

  • cd /etc/yum.repos.d
  • sudo emacs mongodb.10gen.repo
  • paste in the following. This uses the repo for 64bit servers. See their download page for other architecture repo settings.
  • [10gen]
    name=10gen Repository
    baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/
    gpgcheck=0

  • sudo yum install mongo-stable-server
  • sudo /etc/init.d/monod start
  • chkconfig mongod on

That’s it, you’re ready to start using Mongo! You can check the logfile to make sure things are running smoothly: “sudo cat /var/log/mongo/mongod.log”


PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollkit – new version available for download

Апрель 27th, 2010
Just a quick notice to let everyone know that there is a new version of Kontrollkit available. There are some required bug fixes to the formerly new python backup script and some Solaris compatible changes to the various my.cnf files. You can download the new version here: http://kontrollsoft.com/software-downloads, or here: http://code.google.com/p/kontrollkit/
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollkit – new version available for download

Апрель 27th, 2010
Just a quick notice to let everyone know that there is a new version of Kontrollkit available. There are some required bug fixes to the formerly new python backup script and some Solaris compatible changes to the various my.cnf files. You can download the new version here: http://kontrollsoft.com/software-downloads, or here: http://code.google.com/p/kontrollkit/
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollbase – revision 297 fixes Reporter-CLI “alert_22″ sub-routine

Апрель 13th, 2010
Quick note to let our users know that there was an XML tag closure error on the “alert_22″ subroutine in the “bin/kontroll-reporter-cli.pl” script. This does not affect the webapp portion of Kontrollbase – only reports generated via the command line reporter script. It is not a fatal error but will cause the XML file to [...]
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollkit – new backup script is partition space aware

Март 31st, 2010
I’ve been wanting to write a backup script for a while now that does the following: reads the partition information for the directory that you are backing up into and computes the used/available/percentage-available space. Then it reads the total data size from the MySQL tables and ensures that you have enough space on disk (for [...]
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollbase – graph “no data to display” on new install has been fixed

Март 25th, 2010
If you have been wondering why the overview and graphs pages say “no data to display” on the graphs when you first install Kontrollbase, it’s because there’s no data in the database being returned from the queries that generate the graphs – this is because a new install has no data to graph. This has [...]
PlanetMySQL Voting: Vote UP / Vote DOWN

Having an issue with a Kontrollbase upgrade?

Март 23rd, 2010
If you’ve noticed that your recent upgrade did not go as planned and now the application does not load – please check this page: http://wiki.kontrollsoft.com/wiki/UpgradingReleases for notes on upgrades between versions. Typically you need to execute a SQL file against the current schema to bring it up to date. If you have any questions please [...]
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollbase rev292 gets important UI layout fixes

Март 19th, 2010
This is a small revision and will only be available through SVN. However, it is an important one to speak about as it solves a former issue when running the application on a screen smaller than 1024px wide. While most users may not have noticed this since they have larger monitors it has been noticed [...]
PlanetMySQL Voting: Vote UP / Vote DOWN

Kontrollsoft is using Eventum for your support needs

Март 16th, 2010
After some testing and setup we have decided to use Eventum for our support ticketing needs. This featureful system will be in use for all of your support questions related to Kontrollbase – the MySQL analytics and performance tuning web application, as well as Kontrollkit – the collection of server automation scripts. You can read [...]
PlanetMySQL Voting: Vote UP / Vote DOWN