Archive for the ‘MySQL’ Category

IMUG: How Google Built a Strong & Robust I18N Organization in Four Years

Friday, August 20th, 2010

At IMUG tonite Manish Bhargava from Google reprised his talk on “How Google Built a Strong & Robust I18N Organization in Four Years”, previously presented at the WorldWare Conference. Manish is the product manager for Google’s 40 language initiative.

This was a fairly non-technical general talk on Google’s efforts to realize their mission statement.

What was most notable about the talk is that no mention was made of where their i18n staff came from. Google largely gained their deep Internet i18n knowledge from hiring former Netscape and IBM ICU staff. Currently the group hires based on referrals of experienced people.

It was decided to pick the 40 most natural languages as they represented 99.7% of web traffic. (To get to 100% would require 120 more languages.) Google search itself is in 113 languages, and GMail in 54, soon to be 58. Eric Schmidt, Google’s CEO, is a strong supporter of this effort and quality of user experience is considered more important than cost of translation.

Lux-IQ: program to get feedback on international User experience and localization quality of various Google products from a network of in-market evaluators.

Example findings:

Issue type

Language/translation, interaction design, feature missing, feature bugs, visual design, data quality, other. Total.

Google translation toolkit used for ads. Machine translation. Some ad customers request translation into 50 languages for example.

Language Findits. 3 hour testing party for language-related products. Very successful.

Language console would help with finding already translated strings.

Globalization continuum

I18n prd, intl 1-stop, i18n checklist, country planningn legal, content, l10n checklist, translation, review and qa

I18n, planning, deployment

All is global, weekly pushes, 0.25 seconds for search query response

Quality is more important than cost.

High level advice alone – not effective
Deliver concrete solutions, hands-on
Adapt to product needs, constraints and priorities
Earn credibility
Success breeds success
Be persistent

Metrics: intl revenue, top10 problems
Graph of i18n api adoption

Challenges

Unicode redesign
Bidi in webapps
Broad range of environments
I18n technologies
Deep dives: android, chrome, gmail, youtube: to help critical area, new areas

40 language initiative

Take aways

I18n by design
Educate, evangelize, communicate
Design globally, implement locally
Build credibility. Success breeds success.
Retrofitting happens. C’ets la vie. Learn from it.
“Make it easy to do right, and hard to do wrong.”

3 engineers for 7 months to fix gmail

Thanks to Google for hosting.

Twitter: IMUG

# XIHA Connects Facebook and Twitter Friends with New Multilingual Translation http://tinyurl.com/2ankev2 #L10n about 3 hours ago via web

# Zynga Launches First Localized Game In China: Texas Poker. http://tinyurl.com/2fxp9tm #L10n about 3 hours ago via web

# @localization sorry didn’t see your Q (no hashtag) but their i18n team seems fairly centralized but serves all projects and offices. about 4 hours ago via web in reply to localization

# And the event is over! Thank you Manish, and thank you Andrew Swerdow & the Google i18n intergrouplet for hosting! #imug408 about 6 hours ago via web

# Question: is there a process for self-localization of smaller language? Yes, for example Search recently translated into Hawaiian. #imug408 about 6 hours ago via web

# Question: why 40 languages? Those 40 can reach 99.7% of all internet users. Actually 42 now. ~100 more needed for remaining 0.03%. #imug408 about 6 hours ago via web

# Many questions from audience. One was how well-integrated is bug-management system? Manish summarized end-to-end process for that. #imug408 about 6 hours ago via web

# @renatobeninatto approximately 60 attended tonight’s Google #i18n event. #imug408 about 6 hours ago via web in reply to renatobeninatto

# Manish now summing up: #i18n by Design and other take-aways for any organization. #imug408 about 6 hours ago via web

# Google #i18n API adoption has grown 173% since start of the 40 language initiative. #imug408 about 6 hours ago via web

# Google has a team dedicated to #Unicode “Redesign”. #imug408 about 6 hours ago via web

# First two points on successful #i18n: not high-level advice alone; deliver concrete solutions or even hands-on help. #imug408 about 6 hours ago via web

# How can an #i18n team make an impact on projects from the outside? Manish offers 6 points. #imug408 about 6 hours ago via web

# Amazing how much the Web challenges but also offers opportunities in #i18n. #imug408 about 6 hours ago via web

# Interesting timeline now of Google’s Globalization process from i18n thru Planning to L10n. But I’m not going to give it away. :-) #imug408 about 6 hours ago via web

# Apparently this internal Language FindIt program results in far less mischief than other firms’ community translation efforts. :-) #imug408 about 6 hours ago via web

# Manish now onto Language FindIts: Googlers identifying translation & #L10n issues to improve Google products in own languages. #imug408 about 6 hours ago via web

# Interesting discussion going on with audience about MT vs. transcreation. And rule-based vs. statistical translation. #imug408 about 6 hours ago via web

# @renatobeninatto Yes they do use Google Translator Toolkit internally for example in automated ad translation. User can then edit. #imug408 about 6 hours ago via web in reply to renatobeninatto

# @renatobeninatto I found Petra, she says Hi, but she is still making me ask your question. :-) #imug408 about 6 hours ago via web in reply to renatobeninatto

# @ken_lunde yes similar to Wordware but the entrance fee was far less! :-) Very good presentation, great interaction with audience. #imug408 about 6 hours ago via web in reply to ken_lunde

# Google has a program called Lux-IQ to get feedback from local market-savvy non-technical users in all 40 language markets. #imug408 about 6 hours ago via web

# #i18n quality issues include not only basic encoding and locale issues, but also missing features important locally. #imug408 about 7 hours ago via web

# The presentation is now turning to quality issues in #i18n. #imug408 about 7 hours ago via web

# Manish is also presenting case studies, such as their experience with Google Video and Unicode (pre-YouTube). #imug408 about 7 hours ago via web

# And by the way Google is hiring #i18n engineers! #imug408 #jobs about 7 hours ago via web

# Manish has given us perspective on Google’s incredible global growth, and the start of Google’s 40-language initiative in 2007 #imug408 about 7 hours ago via web

# Manish Bhargava, Google #i18n Product Manager, is presenting. #imug408 about 7 hours ago via web

# Tonight’s IMUG event at Google kicked off 1/2 hour late, big crowd not enough badges. :-) #imug408 about 7 hours ago via web

# Going to tonight’s IMUG event @ Google? Maps, directions and more: http://www.imug.org/google/ #imug408 about 10 hours ago via web

# Shirley_Rogers Twitter Unicode Hashtags – http://bit.ly/9ciNuu about 12 hours ago via web Retweeted by i18n_mug

# 57 yes, 5 maybe RSVPs: 8 left for tonight’s 70 chairs. Will it be SRO? Google’s Manish Bhargava is an #i18n star! #imug408 about 12 hours ago via web

# Localization Project Manager, Net-Translators, Sunnyvale, CA. Just posted to IMUG Jobs: http://www.imug.org/jobs/ #L10n #jobs about 13 hours ago via web

# Maps and directions to tonight’s 7 PM Google #i18n event in Mountain View, CA: http://www.imug.org/google/ #imug408 about 14 hours ago via web

# IMUG cannot do webcasts from Google yet. Hope to see you all there tonight! http://tinyurl.com/2f9esas Hashtag will be #imug408 about 14 hours ago via web

# RT @ken_lunde Two font- and CJKV-related Tech Notes now live. http://tinyurl.com/23ffulg & http://tinyurl.com/yzd3hjj <–Kazuraki font! about 16 hours ago via web

# Kazuraki: Adobe’s Groundbreaking New Japanese Typeface http://tinyurl.com/2by46nn Next month’s IMUG event, @ Adobe #imug408 about 16 hours ago via web

# TONIGHT 7 PM: The Google i18n Story http://tinyurl.com/2f9esas Hashtag for this IMUG event @ Google will be #imug408 about 16 hours ago via web

# cathywissink RT @TalkStandards Nascent Web Open Font Format is getting boost thanks to W3C’s new initiatives http://bit.ly/biE85M #typography about 16 hours ago via web Retweeted by i18n_mug

O’Reilly Open Source Conference 2010, Portland

Friday, July 23rd, 2010

Once again, the O’Reilly Open Source Conference (OSCON) was held in Portland, Oregon.

It was a good conference, and we had beautiful weather all week long.

Executive Summary

The themes promoted by the conference organizers were Cloud Computing, NoSQL, Emerging Languages (Scala, Erlang, Parrot, Go) and Android phone development.

The @oscon twitter channel was heavily used to coordinate amongst organizers and attendees. I used the TwiXtreme twitter client program on my BlackBerry.

Plug Computers were very popular in the Expo area. They are 5 watt ARM-based computers running Debian Linux that fit into a power brick-sized case and cost $99 to $129 depending on features. The Marvell booth had a few models on display, from GlobalScale (GuruPlug) and Ionics. High-end models have dual gigabit NICs, multiple USB ports, a WiFi access point and other expansion ports.

There was also continuing buzz regarding Facebook’s Flashcache SSD module (GPL v2) for linux, and also ZFS snapshots.

Tutorials

I went to the Gearman Cookbook tutorial, the first half of the Chef tutorial and some of the Cloud Summit talks.

The Gearman Cookbook tutorial was excellent. After a detailed overview of the Gearman architecture and implementations in Perl and C, a number of use cases were explored in detail, including before and after code samples. The talk was both easy to listen to as an overall survey, as well as providing immediately useful info for those wanting to deploy it.

The Chef tutorial was very detailed – too much so perhaps. I went to the first half only, since I am not planning to implement Chef soon (I use PXE and anaconda/kickstart with CentOS), and did not need that level of detail at this time. cfengine, puppet and chef are ops tools for configuring servers. Chef uses Ruby data structures for its configuration files, and has include files and other useful syntax. Basically, users can “code” server configuration, as if they were traditional apps.

I went to some of the Cloud Summit talks and BOFs, but found that anybody who has done a simple project using EC2 knew as much or more than the speakers, some I would call blowhards.

Marten Mickos, president of Eucalyptus, is refreshing in that he is always clear about being in it for the money, while also promoting Open Source.

Sessions

Some of the most memorable sessions to me were:

Introduction to MongoDB, Kristina Chodorow (MongoDB)

Kristina is the maintainer of the Perl and PHP drivers for MongoDB. She gave an overview of MongoDB, a NoSQL document store, and its command-line interface, which uses JavaScript.

Some day she will release a sharding tool for MongoDB.

Scaling SourceForge with MongoDB, Nosh Petigara (10gen), Rick Copeland (SourceForge.net / GeekNet)

Nosh and Rick gave an excellent review of incorporating MongoDB into the SourceForge site.

- SF query load is mostly read-only
- ops team benchmarked a few NoSQL candidates, and MongoDB won on performance
- original MySQL servers had 64 GB RAM. After migration to MongoDB, same server machines but only 8 GB RAM
- backup dumps are verified to be bitwise the same as masters
- have to be careful not to dump all documents in your database to the network or it will max out switches
- SF relies on first-class data centers and replication slaves, less worried about MongoDB mmap (not crash-safe)
- I personally looked at their performance numbers and site graphs (on an iPad), and the end result was impressive.

Perl Lightning Talks

As always, the Perl Lightning Talks are a highpoint of the conference.

The “cartoon” of Vincent Pit’s remarkable CPAN module(VPIT) contributions was both informative and hilarious. Vincent is a French Ph.D. candidate in advanced geometry.

Cloud BOF (3 Hours)

The Cloud BOF was disorganized, starting 30 minutes late and for some reason was subdivided into 4 audience groups. Startups and vendors trying to make a cloud sales push led the BOF, including cloud and DNS service providers.

The Health Regulations subgroup came up with a couple ways to make the Cloud palatable to regulators by using encryption on all data due to the multi-tenancy issues with sharing public VMs.

I was in the NoSQL group, which discussed general issues and particular successes. Memcached was the clearest winner, while some people also had success with MongoDB and Redis.

My neighbor was an engineer at Postrank.com. He said that they were happy with HAProxy, but much less happy with the unpredictable IO available when running MySQL on EC2. He also said to carefully look at storage volumes available to your instance, as one is a useful tmpfs. They use AuthSMTP to get around EC2 being generally blacklisted for outbound email.

Database BOFs

MySQL BOF

The MySQL AB engineering staff has left Oracle. Monty Program AB (21 staff) has the core developers, and Percona Inc. (32 staff) has the consultants. Oracle still has some of the InnoDB programmers.

The business plan for Monty Program AB is 60% commercially-sponsored MySQL development, and 40% community-request development. Monty would like commercial users of MySQL to sponsor patches that would benefit them.

Mark mentioned that using Nehalem instructions for CRC were much faster, and that Facebook was using partitions for truncating tables instead of doing multi-record deletes. (See his blog for more details.)

One person mentioned using a commercial backup tool, R1Soft, that inserts a linux kernel module to allow filesystem snapshots. He said to carefully test backup and restore in your environment, especially for filesystems greater than 1 TB which may exceed certain block counter limits. Peter said that some of his clients had used it with varying success.

It worked for him in his environment, and the file browser allows selective file restore (he uses it to restore by priority where a system runs multiple applications.) It starts at $299 for the Standard Edition, and also has MySQL Add-on and Enterprise Editions.

PostgreSQL BOF

The PostgreSQL BOF talked about 30 or so changes that went into version 9.

One of the most exciting new features is a native replication feature, called streaming replication (block-based.) The advantage over Slony-I replication is that Slony-I is trigger-based, so has a variety of issues included inability to replicate DDL commands.

Some of the developers mimed replication events, which was rather amusing to watch. Yes, it was taped.

PostgreSQL is released under the PostgreSQL Licence, which is BSDish.

Peter Zaitsev, co-founder of Percona, organized 3 BOFs, including XtraDB, XtraBackup, Maatkit, Percona Server, Sphinx Search and Running Databases on Flash Storage.

Sphinx Search BOF

Andrew Aksyonoff, the original programmer of Sphinx Search (GPL v2), couldn’t make it to OSCON (the good excuse was that he was busy coding), so Richard Kelm (Sphinx sales/customer support honcho) and Peter filled in (Percona is a business partner with Sphinx, and many of Percona’s clients use it.)

Some of the attendees were existing users, like myself, and some from HP and other companies were looking for a large-scale search solution or alternative to Lucene.

Monty mentioned that the latest MySQL 5.1 should be used, as there have been a number of performance and reliability improvements. Full-text search is supposed to be 10x faster than 5.0, and replication is nearly bug-free by now.

Sphinx Search now has real-time index updates in version 1.1.0 beta. Another very nice feature is SQL+FS indexing.

Here is the full Sphinx 1.1.0 changelog.

Running Databases on Flash Storage BOF

The Running Databases on Flash Storage BOF had a combination of MySQL and Postgres users who have tested or used most of the SSD products: FusionIO, violin, Intel, OCZ, etc. Everybody was happy with SSD IOPS performance, but less so with cost and metadata RAM requirements with the add-in boards (FusionIO may require 4 GB RAM for metadata.)

Peter said that 20% to 30% of his clients are already using SSD – across the spectrum of vendors and models. Some are also trying “massive RAM” solutions, like Cisco servers with 384 GB RAM.

Some users had 1+ TB Postgres databases with very thorny backup and mgmt. issues. One solution was to start a snapshot, but not do the copy operation.

Expo Notes

I had an enjoyable talk with Austin Hook, who has operated the OpenBSD Store for many years. He lives near Calgary, the center of OpenBSD/OpenSSH/PF development. He mentioned that some perennial financial contributors had stopped because of the recession, so here’s the donations link.

I also talked to some reps from a Brazilian outsourcing firm, ActMinds. They currently have 400 employees across Brazil and a sales office in Philadelphia. Brazil is only 2 hours ahead of EST. They said the minimum project size is 2 developers and developer turnover a low 5%/annum. Their pricing is $35 to $45/hour.

And I had fun handling the plug computers on display at the Marvell booth. The Ionics boards are amazingly densely populated.

Discussions

I had the opportunity to talk to a long-time Portland resident who works as a computer consultant. He said that the Portland economy is not doing great, and really hasn’t done well since old-growth logging was stopped after 90% of the forests were cleared. And although hundreds of miles of fiber optic has been laid downtown, it’s not available for residential use. However, the Beaverton area does have ubiquitous FTTH.

I also talked to somebody who attended the Emerging Languages talks. He’s working on his M.Sc. in Computer Science, so found those talks fascinating.

Twitter Humor

There were some humorous tweets:

- “my MongoDB and CouchDB mugs are fighting each other.”
- “I got one MongoDB mug, but need two to safely store coffee.”

Notes

Note to self: skip the nightly parties unless you have a date. The bars are too loud to talk to anybody.

Note to the O’Reilly conference organizers: use meetup.com for the BOFs like ApacheCon does. The average audience was about 10 people, and with meetup it would be 4x that.

OSCON 2010 Slides
Tim Bray: Desperate Perl Hacker
Youtube: OSCON 2010 videos
blip.tv: OSCON2010 videos
wikipedia: Plug Computer
Jeremy Zawodny: MongoDB Early Impressions

MySQL Storage Capacity Planning

Sunday, July 11th, 2010

Planning how much storage is needed for MySQL databases is an issue that always comes up when buying new servers.

There’s 2 different general cases, OLTP and logging or Data Warehouse databases.

OLTP Database Storage Capacity Planning

Based on experience, I usually recommend total disk space available to MySQL of around 4x the size of the existing OLTP database to ensure enough working space and to make operations, mgmt. and recovery easier.

Let’s analyze why …

Disk space is needed for:

  • size of database data and index files ( du -sh /var/lib/mysql )
  • size of largest table x 2 if tempfiles or sortfiles are needed, per simultaneous process doing this – hopefully one “rogue” process at a time. (This is one of the main reasons to avoid ad hoc queries on production databases.)
  • size of each backup file, for backups that are stored locally (in a disaster, copying a large database over the network just takes too long for Internet services)
  • size of binlogs if stored outside /var/lib/mysql
  • 5% free for general OS processes
  • 5% to 20% is needed for LVM snapshot space if used

Sample Calculation

1 database + 2 backups + largest table (50% of db) * 2 = 3x, plus some binlog growth and 5% = 4x original database size.

For most users with basic hardware, all of that will be on 1 filesystem.

Surprisingly, even with separate filesystems for binlogs and backups, the maximum filesystem size doesn’t get reduced much:

  1. one backup needs to be on the main data filesystem, unless you want to spend several minutes copying it to /var/lib/mysql instead of a 1 second move. Possible exceptions are if you have a small database backup on SSD or other really fast device. But copying 50 GB at 400 MB/s would still take 125 seconds, or 2 minutes – just for the copy operation alone.
  2. table copies and sorts will be done in /var/lib/mysql unless $TMPDIR is set and working correctly.

Logging/Data Warehouse Database Storage Capacity Planning

For logging and Data Warehouse databases, capacity planning depends heavily on your initial planning and environment:

  • depending on SLA, a local copy may not be needed for quick recovery – just copy from the backup server over the network
  • some DW databases are effectively backed up by keeping the original load files available
  • canned reports can be EXPLAINed in advance to avoid tempfiles and sortfiles
  • storage engines (table types) consume space differently: Archive < MyISAM < Innodb
  • some storage engines, like Archive and MyISAM (but not Partitions in 5.1), allow filesystem-level read-only permissions, reducing recovery time substantially in case of power loss or fsck

I get alarmed when I see a filesystem with MySQL data on it more than 50% full, but far more so with OLTP usage than logging.

Regardless of planning, a cross-join on two multi-million row tables is guaranteed to consume all space. In that case, see the MySQL manual link below for the expected behavior.

MySQL 5.1 Manual: How MySQL Handles a Full Disk

MySQL Privilege System Still a Mess in 2010

Tuesday, July 6th, 2010

It’s already 2010, but the MySQL privilege system has been a mess for over a decade.

Most DBAs are aware that under heavy connection load, the MySQL internal resolver can have problems resulting in login failures, if you don’t use skip-name-resolve.

But I found what appears to be another serious bug …

After issuing a GRANT to create a new user with a wildcard hostname like ‘nagios’@'%.domain.com’ and REPLICATION CLIENT privilege recently to 10x 5.1.30-pro lightly-loaded slaves on CentOS 5.4 without skip-name-resolve, one of the slaves stopped accepting remote connections from any user name. (Local connections still worked fine for all users.)

That’s right … the only change was a GRANT.

Execute the GRANT command …


mysql> GRANT REPLICATION CLIENT on *.* to nagios@'%.domain.com' IDENTIFIED BY 'password';

On a remote server …


$ mysql -u user -ppassword -h hostname
Error 1045: Access denied for user 'user'@'hostname' (using password: YES)

The only thing a little odd about that machine was more than 1 hostname or domain name for that host.

So what can one do to lessen occurrences like this, or at least not get bitten as hard?

  • disable hostname lookups with skip-name-resolve
  • preconfigure grants before going into production
  • expect the unexpected when changing grants in any way
  • know how to quickly and cleanly shutdown the mysql instance and restart it, ideally with startup scripts.

How can one diagnose MySQL privilege bugs?

  • try connections from localhost and remotely
  • write a test script to attempt remote connections to help isolate problems
  • do show full processlist and look for login states or other odd entries
  • mysqladmin flush-hosts to reset the internal DNS host name cache.

MySQL Manual 5.0: 5.4.7. Causes of Access-Denied Errors
MySQL Manual 5.1: 5.4.7. Causes of Access-Denied Errors
MySQL Manual 5.1: 7.5.11. How MySQL Uses DNS
Jeremy Zawodny: Fixing Poor MySQL Default Configuration Values (2001)

IMUG: Internationalizing Twitter

Thursday, May 20th, 2010

Mark Sanford did a comprehensive talk on i18n at Twitter.

He was on the Summize team that Twitter bought, so originally worked on search, then ended up being the i18n guy.

Twitter had a lot of things stacked against it i18n-wise:

- unilingual source tree
- no budget to do any real engineering initially
- Japanese tree translated by outside volunteer partner, Digital Garage
- primitive Unicode support in MySQL and Ruby
- now a legacy system full of data, hard to add metadata like lang/locale at this point.

Japanese cell phone support was challenging because:

- Shift_JIS, not Unicode
- each of 3 carriers uses a different image format and different emoji codepoints, some overlapping
- lack of l10n resources in house for Japanese-flavor design, including being cute, dense and also having an ad to demonstrate business seriousness
- Japan uses cellular emails, not SMS like other places
- mobile browsers don’t support cookies, so URL sessions needed unlike the regular Ruby web app
- hard to tokenize short messages in Japanese.
- need QR (Quick Response) code support (2D barcode)


QR Code

QR Code

Remarkably, Twitter was invited by a number of carriers to support their phones.

Crowdsourced translations using Google Groups, interns and app integrated with Twitter site. Now up to 3,700 strings and 2,600 translators. Hard to translate informal terms like tweet and follower though.

There was very good turnout, with 60 attendees live and 6 online.

Thanks to Adobe for hosting the venue. (Though I don’t understand why there is a 3-year NDA for attending a public meeting.)

techcrunch.com: Twitter Has Basically Doubled In Staff In The Past 6 Months (June, 2010)
Official Twitter Blog

MySQL Conference 2010

Monday, April 12th, 2010

The MySQL Conference was this week in Santa Clara. It was a well-organized and educational event with everybody involved in the MySQL community showing up once again.

Executive Summary

The highlights were:

  • after 2 years of effort, the performance schema foundation is available as a 5.5.x patch. With another year of effort, it could be useful.
  • the various community forks (Percona/XtraDB, MariaDB, OurDelta) will merge in the next 3 months into a maintenance fork by Monty Program, since MP has the most original MySQL developers.
  • the various MySQL vendors are soldiering along, all releasing new, improved versions of their hw and sw products this year.
  • The largest independent MySQL-centric consulting companies are Percona with 32 staff, and Monty Program 40 with staff, with a target of 50 employees.
  • the MySQL source code will have to be modified to make MySQL fast enough to keep up with Fusion IO SSD devices. Currently, better than SSD performance can be gained by installing enough RAM to fit the entire database in buffer pool.
  • Drizzle development is going nicely, but note that it’s not backward compatible with MySQL. Drizzle is a 64-bit only fork of MySQL with emphasis on community code development, increasing performance and maintainability through a plug-in architecture and strict code cleanliness.

Monday Morning Tutorial

Using Partitioning in MySQL 5.1 and 5.5 with Giuseppe Maxia (Oracle)

- available in MySQL 5.1 and later only
- TO_DAYS and YEAR() special and recommended as they can prune partitions from lookups.
- when using TO_DAYS() as a partitoning function, the first partition matters. Use value less than zero for first partition to create NULL partition to double performance as a bug workaround.
- consider lock before inserting for all table types
- for performance, consider non-partitioned on masters, partitions on slaves.
- or different partition types

He also gave a nice tutorial on mysql sandboxes script.

Partition Limitations:

- cannot mix table types
- cannot make read-only

I talked to some advanced users, and none have found a practical use for partitions in their environment that was better than using regular table types for logging type applications.

This is due to the fact that partitions do not increase fault-tolerance, often don’t benchmark any faster, and have little in the way of administrative mgmt. support after partition creation.

Partitions can increase performance in applications where the index serves to stripe operations, but most people are just using dates for logging, with no practical benefit, as most operations fall into the current date partition.

Slides

Monday Afternoon Tutorial

Talked to Arjen Lenz and a friend at lunch.

- OpenQuery is suitable for affordable, long-term contract databae admin, not firefighting
- former partition tester and bugfixer
- replication bug with TCP errors, nagios plugin should compare both replication lag seconds and log position
- need SSL or heartbeat to detect/fix

memcached

- set all clients to same values
- use JSON or YAML, not Storable or Pickl

Tuesday

Performance Schema with Peter Gulutzan

- coded by Alff, but not GA yet
- PERFORMANCE_SCHEMA database optionally populated with events (mutex, lock, io) timing and count info
- allows simple SQL reporting of performance

EXPLAIN Demystified with Baron Schwartz (Percona Inc.)

- perennial nice EXPLAIN overview
- nice example of using mysql command prompt as pipeline for non-trivial processing

Introduction to InnoDB Monitoring System and Resource & Performance Tuning with Jimmy Yang

An Overview of Flash Storage for Databases with Vadim Tkach, Percona Inc.

- nice talk with useful performance graphs

Linux Performance Tuning and Stabilization Tips with Yoshinori Matsunobu, Sun Microsystems

- nice talk with detailed slide examples – he’s a hard worker
- he’s a fan of xfs, so some info not always useful for ext3. ie. deadline scheduler may be better on xfs, but it feels the same to me as cfq on ext3.

Wednesday

More Mastering the Art of Indexing with Yoshinori Matsunobu, Sun Microsystems

- second-part continuation of his talk from last year (!) Were you there?
- his understanding of the space requirements of blobs in Innodb is different than Peter Zaitsev’s.

Faster Than Alter – Less Downtime with Chris Schneider (Ning.com)

- Hipster presentation on doing practical DBA tasks
- likes doing dump and restore on Innodb tables, 30% faster afterwards on his tables.

InnoDB Architecture and Performance Optimization with Peter Zaitsev, Percona Inc.

- perennial comprehensive overview of Innodb
- talked about differences between Antelope and Barracuda file formats
lwn.net: A look at the MySQL forks

BOFs

O’Reilly failed to use meetup.com to promote the BOFs once again at this conference, so turnout was light to moderate as in past years.

Sphinx BOF hosted by Andrew Aksyonoff

I’ve been familiar with SphinxSearch for years and am a production user, so the general audience discussion was not interesting to me.

However, I had a chance to talk to Andrew about my take on the October Apache (Search!) Conference last October and suggested a few things:

  • explain collections on the Sphinx homepage, since many users insist on this feature. The question, of course, is what does the term ‘collections’ mean to various people?
  • make it possible for a non-technical end-user (like a marketing asst.) to highlight 10 items for feature on the first page of results
  • Microsoft is EOLing FAST for linux users, so think about promotion to that segment, who is considering migration to Lucene mainly – because Lucene is free, and migration is the same cost to any other product.
  • look at the myriad “value-added features” of commercial search engines, mostly related to adserver integration, and decide what can be supported.

MariaDB BOF hosted by Monty

Not much talk about MariaDB, but lots of drinking! (See Monty’s keynote for more detailed info.)

Conference Wrapup

Overall, another good MySQL conference. The organizers restored balance to the presentations, with a fair number of independent consultants and end-users doing talks. (Though I miss the awesome Percona Performance Conference from last year.)

BOFs should be promoted on meetup.com to double participation.

There should be a room with exotic hardware to demonstrate high performance MySQL and MySQL Cluster configurations – SANs, Infiniband, failover, etc.

The lunch food was quite good on all days, as noted by several people. (Important because the suburban venue is not within walking distance to outside restaurants.)

James’ NoSQL Feature Matrix Link

Tuesday, December 22nd, 2009

A wikipedia editor (SamJohnston) has reverted the useful NoSQL Feature Comparison Matrix that I added at ApacheCon Oakland.

Here is the last NoSQL article version that has the detailed feature matrix.

Thanks to several contributors for improving it before it was suppressed.

I would be in favor of moving it to a wiki outside of wikipedia for long-term maintenance.

One nice improvement would be sort-by-column.

Jimmy Wales’ goal for wikipedia “to be the sum of all human knowledge” is not possible with a rigid NPOV and without primary sources. Instead, wikipedia will remain “the entertaining cartoon of human knowledge.”

I’ll have to think twice before contributing my time, content or money to wikipedia in the future.

rackspacecloud.com: NoSQL Ecosystem

ApacheCon 2009 Oakland

Friday, November 6th, 2009

I went to ApacheCon 2009 in Oakland. Why Oakland? The ASF was founded here 10 years ago.

Executive Summary

Most of the attendees that I talked to were primarily interested in search technologies, or were Apache project comitters. The search users were already using either Lucene and Solr, or were using commercial software and evaluating Lucene and Solr.

Also a lot of interest in Hadoop, Zookeeper and NoSQL projects.

I added a wikipedia NoSQL project features table after the NoSQL BoF.

The conference was very well-organized, with tutorials, BoFs, a BarCamp, and sessions. Meetup.com was used to generate the highest BoF turnout that I’ve ever seen – close to 100 at the Lucene and Hadoop BoFs. (O’Reilly Conferences can learn from that.)

The Oakland Convention Center was a good venue for this conference, though the attached Oakland Marriott hotel is $$$$ and fond of surcharges, like $33/day for parking, $5 draught beer and $3.75 for a bottle of water in-room.

The keynotes and one track per day were recorded and are available for $99 at Linux Pro Magazine Streaming.

StoneCircle Productions was the conference organizer.

Conference Notes

Monday

Although I live in San Jose, Oakland is far enough away that I’ve never been there. Oakland has a compact downtown full of historical-era buildings, and Alameda is also nice, but things get less pretty at night.

I went to the Lucene tutorial on Monday.

Lunch Conversations

- awesome views of Bay Area past Golden Gate bridge from 21st floor
- FAST pretty good indexing and search solution, but bought by Microsoft recently (going to continue linux support or not?)
- FAST has FQL (users pronounce it fecal) query language :)
- 150 FAST servers replaced by 40 lucene servers by 1 company
- FAST4 to FAST5 upgrade tough, similar to port to say lucene, forced upgrades for support
- linguistics is 60% of value of Fast according to Monster, 13 languages supported
- “bad stems” can be a nightmare
- SOLR gives you 90% of what you would need to program in java, built on top of Lucene
- Open Source search is not really about price, but about control and flexibility

Monday Afternoon – Lucene Tutorial

- user-assigned document id not mandatory, but great idea for many reasons, including after an index-rebuild
- lucene-assigned id only valid for that snapshot (life of score doc)
- parameter to keep or delete old index directory
- StringBuilder is more efficient than strcat
- populating title column is a good idea
- results boosting handy for ecommerce, specials, etc.
- LUKE – handy tool for index statistics, etc.
- Searcher class, snapshot in time, won’t see new merges
- contrib/ has more analyzers
- snowball stemmers
- use 1 tokenizer and 0 or more token filters
- precision-recall curve ??
- n-grams and shingles (”the president”, “United states”)
- pre-2.9 lucene, numbers and dates really strings
- 2.9 NumericField builds tri structure, help optimize range queries
- SOLR analysis tool apache-solr
- relevance feedback with MoreLikeThis

Monday BoFs

Couchdb

- “ground computing”
- “offline by default”
- now an ubuntu service
- mozilla raindrop to combine chat client msgs
- lockless
- append-only btree
- rsyncable since append-only, also replication
- checksums everywhere
- windows not first class yet, mozilla improving it

@mozilla

- browsercouch
- don’t like sql
- brasstacks test tool storage
- store now, index later
- replicate to handle large indexing load
- testbot ci

Marklogic

- commercial
- xml-centric
- great for articles, books
- transactional
- search-centric
- structure-aware
- schema-free
- xquery-driven
- extremely fast, largest 200 TB xml, 166 on hosts
- clustered
- database server
- 180 clients, 150 employees
- markmail.org demo contains 42 million email messages, very impressive performance with 5 views in almost realtime. Search is distributed across 160 nodes.

JCR in 15 minutes

- Bertrand Del
- JCR is JackRabbit,
a fully conforming implementation of the Content Repository for Java Technology API (JCR). A content repository is a hierarchical content store with support for structured and unstructured content, full text search, versioning, transactions, observation, and more.
- the ultimate content store
- content repo, union of database and filesystem, best of both worlds
- full-text search combined with structured search

Solr Flair

- information forage
- “resume-driven design”

Lucene Numerics

- available in 1.4
- tune by modifying precisionStep

HBASE

One bewildered attendee wished for a NoSQL product matrix, so I added that to the wikipedia NoSQL page.

Wednesday Sessions

Becoming a Pig Developer, Alan Gates

- Apache Pig is a sub-project of Apache Hadoop.
- this talk was really how to use PIG as an end-user, not to become a Pig project developer

Apache Hadoop in the Cloud, Tom White

- general comments on using EC2 with Hadoop mostly

Practical HBase, Michael Stack

- Apache HBase is the Apache Hadoop database, similar to BigTable.
- HBASE usage

mod_jk / mod_proxy and others, Jean-Frederic Clere and 2 others

- mod_jk, mod_proxy, mod_serf and mod_cluster original topics
- mostly focused on mod_jk, mod_proxy and isapi_redirect
- good talk by 3 long-term project contributors
- jk is kind of Java-centric, with support for Apache JServ Protocol (AJP) only available in Java back-end servers for now, like Tomcat
- isapi_redirect is primary way to do redirects on Windows IIS
- survey of audience showed several mod_proxy users, maybe one intentional mod_jk user

Thursday Sessions

“Apache Lucene and Apache Solr Performance Tuning with Mark Miller” was packed, so moving along to a different room …

Scalable Internet Architectures, Theo Schlossnagle

- amazing and thought-provoking talk, also one of the most popular
- think about performance from network packet level to application level
- carp, vrrp, whackamole
- alterdns, neustar
- dynact
- anycast (shared IP), geoip (but need actually accurate database)
- activemq, rabbitmq instead of Spread
- “memcached is the worst thing that ever happened to our industry – it solves a problem, just not the original problem”

- many apps today are so poorly designed that network issues never become scalability concerns – ie. RoR applications :)
- max out at 500 requests per second across 40 boxes – RoR
- firebug and yslow have been fantastic at making front-end engineers aware of networking performance
- 10 gb nics suck
- instead of one big 20 Gbps loadbalancer, use anycast from core router to 5x 4 gpbs cheaper load balancers
- spiky load or DDoS – announce a /32 to separate load balancer, use symmetric return path

- jms, aqmp, spread

durable message queues

- activemq (java)
- openamq (c) – hard to use
- rabbitmq (erlang) – nice except in durable mode because erlang disk io blows

- most common protocol Stomp is awful and slow (hard to read 100k messages per second) and not binary, but lots of clients exist.

- activemq and stomp is a good start.
- rabbitmq and native connectors are better, but no perl client.

- PCI compliance requires a stateful firewall. Hard to do 1.5 million packets per second traffic for most medium-sized data centers, need to use a CDN to distribute static requests and distribute the packets somewhere else
- leaving trailing / off causes 302, doubles traffic
- Slides
- read/write ratio is 1 … likely IM or email?
- went over some networking details with Paul L. afterwards

Recent Developments in SSL and Browsers, Rick Andrews, Thawte

- 1.6 billion OCSP requests per day, need good infrastructure to support that
- intermediate CA allows root CA to be offline – chained hierarchy – SSLCertificateChainFile,
needs intermediate certificates before cross-certificates, some clients need in proper order
- EV hierarchy more complex. wanted new EV root, but older browsers don’t know about it.
- browser ubiquity problem with any new feature, hash or crypto algorithm
- logotypes – trademark and copyright issues with using other companies’ logos in a product
- Verisign does not have apache httpd committers, but should
- 1 attendee wanted to sign JavaScript files, but what does it mean if most sites link to 10 advertising and tracking scripts? what do you tell the user if 1 JS is not signed?

Subversion Meetup

Organizers didn’t show up, so spent 10 minutes talking to a handful of end-users about subversion gripes and moved along to …

Hadoop Meetup

Zookeeper

- zk is persistent to disk
- can run on one node, but 3 is minimum non-toy
- zk is popular in academia now for some reason
- avoid split-brain partitioning between 2 data centers – bad
- very recent merge to fix -368, not ready for production yet
- people using it for a message queue, perhaps more reliable than many other Open Source ones
- need 1 zk node for testing, but 3 zk nodes for non-trivial implementation

Scribe

- github
- 4x to 5x compression with lzo. similar disk bw improvement

A local owner of a gelato store handed out 6 free samples from a portable gelato freezer. :)

Friday Sessions

Building Intelligent Search Applications with the Lucene Ecosystem, Ted Dunnin

- some matrix math
- using his matrix math optimization, a perl program on 1 server was faster than Mahout running on a $250k cluster :)
- tdunning.blogspot.com

- the original LLR in NLP paper
“Accurate Methods for the Statistics of Surprise and Coincidence” check on citeseer
- Mahout project
tdunning [at] apache.org

Realtime Search, Jason Rutherglen

- many technical issues prevent Lucene from being able to do realtime search
- lots of patches done, lots to do
- audience member thanked author for great work so far

Closing Plenary: Brian Behlendorf on Open Source and Charity

Talked to Alex Karasulu a little after the final presentation. He’s a committer on the Apache Directory project. He suggested adding dbm to the NoSQL product matrix. Wants a MacBook Air with 8 GB RAM to run his Java apps. :)

Conference Schedule Grid