Caching for Monitoring: Timing is EverythingI found Baron’s reasoning on why the Percona Nagios plugins do not use caching interesting. On the surface, the logic is sound – you do not want to cache when you want real-time monitoring. Edited to add: I just took a look at the Percona monitoring plugins for Nagios and they check very, very different things. The level of customization is not as flexible as it is with the PalominoDB Nagios plugin, because it is checking very different things. The Percona monitoring plugins are a set of 12 different checks, as opposed to the 1 check that the PalominoDB plugin has. Still, I could see a value in caching the output of SHOW ENGINE INNODB STATUS (or whatever it uses) for the pmp-check-mysql-innodb plugin, so you can run it three times - once with the idle_blocker_duration option, once with the waiter_count option, and once with the max_duration option, and it only runs the command needed once. Basically it comes down to this: Baron is correct when he says "Running SHOW STATUS infrequently doesn’t add load to the server." and I am correct when I say "Running SHOW STATUS frequently adds a lot of load to the server." The Percona plugin and the PalominoDB plugin are completely different, and there seems to be very little overlap.
This week in Mozilla Databases: Friday February 17, 2012I have been at Mozilla nearly three months, and I used to blog a lot more than I currently do. A lot of the content I used to blog about I end up blogging and talking about in OurSQL: The MySQL Database Community Podcast. And I have also been getting used to the Mozilla firehose, as well as my own firehose of database projects that need to be done.
This week in Mozilla DatabasesI have been at Mozilla nearly three months, and I used to blog a lot more than I currently do. A lot of the content I used to blog about I end up blogging and talking about in OurSQL: The MySQL Database Community Podcast. And I have also been getting used to the Mozilla firehose, as well as my own firehose of database projects that need to be done. There are two very large projects that are time-sensitive that I am working on: migrating databases from an older data center to a newer one, and the impending public launch of the Mozilla Apps Store. That being said, this week in Mozilla databases we have: - migrated/improved/built our dev/stage databases for Socorro, our crash stats database. - put monitoring on a newer backup server, after a random check showed replication had been stopped on one backup instance for several days due to the master's binary logs changing names. Of course we also fixed that broken replication. - made more progress getting the newer backup server to act like the older backup server - we do physical and logical backups, and currently the logical backups are working properly. The physical backups are a legacy cold backup, and I will not be migrating that, instead opting to use xtrabackup. - turned off our Scalarc software, as we now have an appliance for our proof-of-concept test. - retired 2 machines that were not in use, and exist in our older data center. I am always paranoid when I shut a machine down, triple-checking that I am on the right server when I type "shutdown now". - did a test migration of the production database for Mozilla QA, from the old data center to the new one. - added new custom fields to Bugzilla for the release of Thunderbird 10. - Created new databases and access for: There is much much more to come in the weeks ahead! User Group Videos....I have been attempting to be better about letting folks in the general MySQL world know when the videos from the Boston MySQL User Group are up. We have a great group, with anywhere from 20-50 attendees each month, and the speakers are always great, even when the group asks some tough questions.* Thanks to the generous donation of time that Richard Laskey puts in editing the videos, there are 2 videos I can share with you: Ivan Zoratti of SkySQL presented MySQL HA Reloaded at the December MySQL Boston Users Group. Slides are online at http://www.slideshare.net/izoratti/ha-reloaded-11261643 Tim Callaghan of Tokutek presented Fractal Tree Indexes -- Theoretical Overview and Customer Use Cases at the January MySQL Boston Users Group. The next meeting is Monday, February 13th from 7-9 pm and will feature "Scaling MySQL with Transparent Database Sharding", by Victoria Dudin of ScaleBase. RSVP for the free meeting here or wait until the video comes out, if you are not local. * The group is really great about RSVP'ing too -- we usually get the approximate number of folks RSVP'd actually showing up. I recently went to a local user group that had over 100 people RSVP' and only about 1/3 of them showed up. I guess if you know the pattern you know how to 'read' the numbers, but as a speaker I would have been disappointed to expect an audience of 100 and have an audience of 30. Then again, maybe the speaker was informed of this...I have no clue. I guess what I am trying to say is that I really appreciate the Boston group! Liveblogging: Performance is Overrated, by Mark CallaghanMark Callaghan speaks at the New England Database Summit about how data manageability is more important than performance. Peak performance is thrown out, 95%-98% is important. Variance shouldn't be large. Data manageability is rate of interrupts per server for the operations team. Rate of server growth much bigger than rate of new hires for the systems teams. A lot of the db team is from University of Wisconsin-Madison! Why MySQL? Because it was there when he came. Mark and ops/engineering peers made it scale 10x. He likes MySQL for OLTP, InnoDB is "An amazing piece of software." They can get 500,000 qps using a cached workload, which is on par with memcached. What Facebook really does is OLTP for the social graph. The workload is secondary indexes, index-only queries, small joins but most queries use one table, multi-row transactions, majority of workload does not need SQL/optimizer, they do a physical and logical backup. Most of this does not require SQL [blogger's note - they built Cassandra]. Why is the grass greener on the other side? automated replacement of failed nodes, less downtime on schema changes and/or fewer schema changes, multi-master, better compressions, etc. Circa 2010, 13 million queries per second, 4 ms reads, 5 ms writes, 38GB peak network per second, etc. Why so many servers? Big data high queries per seconds. They add servers to add IOPS, so they're interested in compression and flash, so they can get more IOPS. If they do remain on disk, write-optimized dbs are interesting too. About 10 people on the db team, which is very small for a company that size. How to scale MySQL? Fix stalls to make use of capacity, improve efficiency to use fewer queries/fewer data. Fixing stalls doesn't make MySQL faster, makes it less slow. [blogger's note - I stopped taking notes here because this is a rehash of the "How Facebook Does MySQL" talk that has been done over and over...] [restarted when he started talking about data manageability again] How Facebook got it's data manageable. pylander- sheds load during a query pileup - kills dup queries, limits # of queries from some specific accounts -- take off on Highlander: there can be only one. dogpile - collects data during a query pileup - gets perf counters and list of running queries, generates HTML page with interesting results. Online schema change tool, for frequent schema changes, especially adding indexes. This briefly locks the table, to setup triggers to track changes, copy data to a new table with the new desired schema, replay changes to the new table, then briefly lock the table again as you rename the new table as the target table. Manageability is a work in progress -- working on: open issues in manageability: Presenting on Security Topics at Percona's MySQL ConferenceI am honored to have been selected to give a 3-hour tutorial on white-hat Google hacking and other MySQL security topics at the 2012 Percona Live: MySQL Conference and Expo. The tutorial schedule can be found here and for more about the presentation I will be giving, you can see Google Hacking MySQL and More MySQL Security. I am also pleased that Percona has given a discount code for OurSQL: The MySQL Database Community Podcast listeners - 10% off any ticket price with code PL-pod. The discount is on top of early bird prices, so you get two discounts this way! I cannot wait for the conference -- all the tutorials and sessions look very top-notch. Do not attribute to malice....Yesterday, during a session at a User Group Leader's conference, I suggested to the MySQL Community Team (Keith Larson and Dave Stokes) that it would be nice to see all the events that Oracle does that are MySQL-related, because everyone else is posting their MySQL events to Planet MySQL and Oracle was talking about events I had never heard of. I noted that http://events.oracle.com/search/search?group=Events&keyword=mysql has an RSS feed. Well, Keith and Dave also thought that was a good idea, so they added the feed. Looks like Oracle's feed isn't so great, though, and they're working on the fix with the appropriate tech folks within Oracle. I think it is ridiculous that some folks say things like "I hope planet mysql has not been hijacked!". Of course it has not -- this is a silly technical issue, which is pretty obvious once you think about it -- when the feed was added, it added the most recent posts. It looks like those posts might be in the future or something. It's just a broken RSS feed, folks. Why is everyone so quick to try to accuse Oracle of bad stuff? They certainly have not been perfect, but they have done a lot of good, sprinkled in with some bad stuff here and there. Just take a deep breath, relax, and think about e-mailing the community team when that happens. That's what I did. MySQL Community and User Group slidesThis week I have been at the IOUC User Group Leader's Conference, and I have met a ton of great folks who are user group leaders and made some great contacts for future speaking engagement. Follow this space to learn about calls for papers for international conferences! First up is the call for papers for the OUG Harmony conference. The OUG is the Oracle Users Group for Finland and Latvia, in conjunction with Estonia and Russia. The Finland conference is specifically looking for MySQL content, and is May 30-31st in Hämeenlinna, Finland. Talks can be in Finnish or English, and they're looking for good basic MySQL information. I spoke today at the conference about the MySQL community - who it is, how it's grown, and what the challenges are as we try to find our place under the Oracle banner. Slides are at http://bit.ly/mysqlcomm2012. I have to say that I love doing slides in HTML and CSS, as I'm already very familiar with it, and I don't have to worry about a separate Office program. I marvel at how open Mozilla is, and you too can make slides as I did, though I'd recommend changing the CSS so you can represent your company. It took me about 5 minutes to figure out how to work things, thanks to our public documentation at https://wiki.mozilla.org/HTML_Slides -- which, by the way, I found by Google searching for "Mozilla slides". Note that anyone can develop slides on Mozilla's site or export it yourself to work on offline...I found it handy to develop the slides right on the Mozilla type, and whenever I saved it the display version automatically updates. Pretty nifty stuff. Replication and Data IntegrityLast week, Baron pointed out that semi-synchronous replication is not synchronous. I learned a lot reading that post, but I was surprised it was used to pimp the Percona cluster, with no comparison to MySQL's own cluster solution -- that would be a much more fair comparison. There is one critical point Baron did not make, though.... whether it's semi-synchronous replication or regular asynchronous replication, there is no guarantee of data integrity. I saw this over and over when I was consulting. Just because replication is not failing does *not* mean that the data on the master and slave are in sync. There is no form of replication that verifies data integrity. You can check if the data on the slave is in sync with the data on the master with pt-table-checksum and pt-table-sync, from the Percona toolkit. I use those tools widely. I have not yet started using the new version, which boasts just working out of the box -- right now there are many options I use, in addition to the ones listed in the blog post that even I reference to this day I have also started using --chunk-size-limit, to avoid pt-table-checksum skipping chunks that are just a bit too large. I am excited about the rewrite of the tools and have it in my plan to use them. I hope they will save me a lot of time. In my mind, checksumming is as critical as backups (in fact, if you backup from a slave, you must verify that the slave is in sync with the master and has no data integrity issues). It is not optional. Hopefully you already know that replication does not verify data integrity, but if you did not know, now you know and you also know how to check for that. What I do is have the checksum run with the modulo/offset feature every so often on the master, and within a week or 2 of a data discrepancy happening, I find it, using a daily monitoring check to see if the checksum table on the slave has matching values for the data on the master and the slave. Working for an Open CompanyMany of us know what it's like to work at an open source company. About 6 weeks ago I started my job as a Senior MySQL DB Admin/Architect (DBA but the "A" stands for both) at Mozilla. And I have to say, working for an open company is a lot different from working for an open source company. There's so much more that's, well, open. I can point to the Bugzilla bugs database, where all our ticket tracking is done. It's open to the public, although on the systems side we mark a lot of bugs private because they contain important information like hostnames and IP addresses and what ports are open vs. not. Or I could point to my director's quest to make the IT department more open - one that I think is possible, although it does make our legal team try to figure out exactly what constitutes an employee and what does not (or rather, what could be argued in a court of law if it comes down to that). The greatest example that I have seen of how open the company is came from a coworker's blog about our anti-SOPA/PIPA efforts - the blog points to an etherpad document used to collaborate on what needed to be done. You can see that it was a lot of work, but the part that stands out to me is this: You can see it. It's amazing to me how open the company is, and how very little suffers from it. Plans are divulged, there are very few secrets -- most of those are required by the folks we work with, not by Mozilla itself. A great SOPA/PIPA analogyToday, English versions of major sites like Wikipedia and Mozilla (my employer) are going dark to protest SOPA and the PROTECT IP Act. If you think SOPA/PROTECT IP Act is not a big problem, or if you are having trouble explaining why it is a problem to folks who are not as aware, a post by Mitchell Baker should help clear things up. Baker illuminates the problem, complete with references. You should read the article, it is not very long, but here is a snippet: "Assume there’s a corner store in your neighborhood that rents movies. But the movie industry believes that some or even all of the videos in that store are unauthorized copies, so that they’re not being paid when people watch their movies. What should be done? SOPA/PIPA don’t aim at the people trying to get to the store. SOPA/ PIPA don’t penalize or regulate the store itself. SOPA and PIPA penalize us if we don’t block the people trying to get to the store. The solution under the proposed bills is to make it as difficult as possible to find or interact with the store. Maps showing the location of the store must be changed to hide it(1). The road to the store must be blocked off so that it’s difficult to physically get to there(2). Directory services must unlist the store’s phone number and address(3). Credit card companies(4) would have to cease providing services to the store. Local newspapers would no longer be allowed to place ads for the video store(5). And to make sure it all happens, any person or organization who doesn’t do this is subject to penalties(6). Even publishing a newsletter that tells people where the store is would be prohibited by this legislation(7)." (footnotes left out, this is just a copy/paste, click through to to the article to see the notes). Renormalize, Encrypt, MongoDB videos onlineThanks to the extraordinary work of volunteer superstar Richard Laskey, the videos for the September, October and November Boston MySQL user group meetings are available. Whether you want to encrypt, renormalize or learn how MTV uses MongoDB, there are now full-length videos available: MongoDB @MTV by Jeff Yemin of MTV Networks, September 2011 Renormalize - Solving Performance Problems in MySQL without Denormalization by Ari Weil of Akiban, October 2011. MySQL Encryption with Gazzang by Mike Frank of Gazzang, November 2011. Enjoy the videos! When Disaster Strikes, You Can Learn a LotMy first week at Mozilla was relatively uneventful. I spent it at the Mountain View office, meeting people in person, having a few meetings, and actually doing a few tasks in addition to all of the setup and overhead that comes with being a new employee. After traveling back home to Boston, my second week of work was a bit more eventful. We had a RAID array fail when we went to replace a disk. The RAID array held all of our e-mail, so until we could restore a backup and work on getting as much post-backup data we could out of corrupt databases (LDAP and MySQL), nobody had e-mail. E-mail is a very big deal in any company, and Mozilla, with around 600 employees, is no exception. It was fascinating to watch my new coworkers deal with a crisis of this magnitude. A person's true self is brought out under pressure, and I got to see how everyone acted and reacted. Folks who wanted to help but could not stepped aside to let those with the requisite knowledge/experience fix things. Higher-ups asked for statuses. Employees found ways to communicate without e-mail. I watched this all unfold with an observant eye - especially within my team. I am happy to learn that my coworkers (including my boss) are smart, helpful, know when to jump in and when to stay out of the way, sensitive to those who are under pressure, do not spend time rat-holing on the past, and avoid the blame game. Of course, as Tim Callaghan pointed out at the December Boston MySQL User Group on Monday evening, what would I have done if I found out that my team was a bunch of finger-pointers, my boss was a jerk, and everyone complained selfishly? Luckily, that's not a scenario I have to worry about. Sheeri's Mozilla FeedSheeri's feed from the Mozilla.com IT blog
Last Day at PalominoDBI have been the Community Liaison and a Senior DBA at PalominoDB for 15 months, and doing remote DBA work for 4 years. In that time I have learned that "consultant" need not be a dirty word, and that in the DBA world it is actually extremely valuable to have a remote DBA with lots of outside experience, and a team of remote DBAs for when your primary contact is sick or goes on holiday.As with everything, there are downsides to remote database management. Even though there is a lot of architecture experience among the remote DBAs I know, we are not often invited to architecture meetings. This is because time is the unit of currency, and while sitting in an hour-long meeting to give 5 minutes of feedback can save hours down the road, it's hard to see that. Many clients have gotten around this by having all DDL checked and performed by remote DBAs, and that helps a lot.There is also no ownership - we can recommend solutions and technologies, but the client makes the actual decision about whether something needs to be done or not. I look forward to actually owning architecture after 4 years of making "strong recommendations".Since folks will ask, I have taken a job as a Senior DBA/Architect with Mozilla, starting Monday. A former co-worker told me about the job; I was not particularly looking for anything, but I was intrigued.I have said before that it is hard to find a good in-house DBA if you are not a huge company like Facebook or Google or Yahoo, and that is still true. At Mozilla, they are 100% open and public about their ideas, and they do a lot of behind-the-scenes work. Sound familiar?They also allow their developers to develop on whatever platforms work best. Their biggest database is their crash reporting database (and they do read it, so do submit your crashes). They have MySQL, PostgreSQL, and MongoDB, and are starting to move some applications around, as developers are not always aware of what platforms will work best. There is another DBA, so I will not be alone, but I expect to be just as challenged at Mozilla as I have been at PalominoDB and Pythian.So, to keep up with PalominoDB, you can:- like the PalominoDB page on Facebook- follow @palominodb on Twitter- connect with Laine on LinkedIn- follow PalominoDB on LinkedIn- continue to read PalominoDB's blog and Planet MySQL To keep up with me, you can:- follow @sheeri on Twitter- read my blog and Planet MySQL- connect with me on LinkedIn- subscribe to the OurSQL podcast (details at http://www.oursql.com/?page_id=2)
PostgreSQL 9.1 Presentation Slides availableOur resident Postgres expert Emanuel spoke at the Libre Software World Conference last week about PostgreSQL 9.1, and as the Community Liasion for PalominoDB for a few more days, I am posting the slides so that folks can download them. They are in PPT format:
http://dev.palominodb.com/docs/LSWC_POstgresql_91_English.ppt Enjoy, and remember that all of our presentation slides and videos are available at any time from our Community -> Presentations page.
New England Database SummitThe New England Database Summit is an all day conference-style event where participants from the research community and industry in the New England area can come together to present ideas and discuss their research and experiences working with on data-related problems. It is an academic conference with applications to real life, and includes any type of database. The 5th annual NEDB will be held in Cambridge, MA MIT (in 32-123) on Friday, February 3, 2012. Anyone who would like is welcome to present a poster (registration required), or submit a short paper for review. We plan to accept 8--10 papers for presentation (15 minutes) at the meeting. All posters will be accepted. For more details, and to register and / or upload a paper, see:
Getting a List of Users From the MySQL General LogFrom time to time, organizations want to know if there are any users that are not used. For clients using MySQL 5.1 and up, that can handle a 1% overhead for general logging, we will enable the general log for a period of time and analyze the users that connect. Note: we have some extremely busy clients, and we very rarely have a problem turning the general log on, other than making sure we're rotating and compressing logs so we do not run out of disk space. Once we have the logs, I run this little perl tool I made -- I call it genlog_users.pl: #!/usr/bin/perl
my $infile=$ARGV[0]; my %seen=(); my @uniq=();
open (INPUT, "<$infile"); while (<INPUT>) { my $line=$_; if ($line=~/Connect/) { if ($line=~/(\S*@\S*)/) { push(@uniq, $1) unless $seen{$1}++; } } # end if line matches Connect } close INPUT; open (OUTPUT, ">>..users.txt"); $,="\n"; print OUTPUT (keys %seen); print OUTPUT ("\n"); close OUTPUT;
---------- I hope it is useful for whoever stumbles on this; I know it has been useful for me in the past -- it's just doing some string matching, and I bet if I used Python it would be done in half the lines, but it's already fewer than 20 lines, so it's pretty small to begin with.
PalominoDB Percona Live: London Slides are up!
Percona Live: London was a rousing success for PalominoDB. I was sad that I could not attend, but I got a few people who sent "hellos" to me via my coworkers. But on to the most important stuff -- slides from our presentations are online! René Cannao spoke about MySQL Backup and Recovery Tools and Techniques (description) - slides (PDF)
|
Follow me on:SearchNavigation |