... more stuff
at
php-app-engine.com

Archive for the ‘MySQL’ Category

MySQL-Memcached or NOSQL Tokyo Tyrant

Friday, January 15th, 2010

http://www.mysqlperformanceblog.com/2009/10/15/mysql-memcached-or-nosql-tokyo-tyrant-part-1/

A classic example is a simple online game. An online game may only require that an application retrieve a single record from the database. The record may contain all the vital stats for the game, be updated and stuffed back into the database. You would be surprised how many people use this type of system as I run into this type of application frequently. Keeping it simple, ensures that application is generally mean and lean and performs well. The issue is even this simple design can start to have issues as the data size increases and you blow through your available memory. Is there a better architecture? Is there a way to get more scalability out of your database? Is the database even the best place for this data?

percona guys (one of the highest mysql authorities) put some nails in mysql coffin (innocently?)

How FriendFeed uses MySQL to store schema-less data

Sunday, January 10th, 2010

http://bret.appspot.com/entry/how-friendfeed-uses-mysql


We use MySQL for storing all of the data in FriendFeed. Our database has grown a lot as our user base has grown. We now store over 250 million entries and a bunch of other data, from comments and “likes” to friend lists.

As our database has grown, we have tried to iteratively deal with the scaling issues that come with rapid growth. We did the typical things, like using read slaves and memcache to increase read throughput and sharding our database to improve write throughput. However, as we grew, scaling our existing features to accomodate more traffic turned out to be much less of an issue than adding new features.

How to make a xfs 4 disk raid 0 partition for ec2 mysql for maximum disk io performance

Friday, December 18th, 2009

http://www.initsix.co.uk/content/how-make-xfs-4-disk-raid-0-partition-ec2-mysql-maximum-disk-io-performance

Use this technique at your own risk. You need to be hot on snapshots, backups and restores to ensure you dont lose everything.

* Raid 0 offers no fault tolerance
* Disk reads and writes can be potentially 400% faster
* Loss of one disk will destroy the entire dataset

tpcc-mysql rough benchmark for Amazon RDS

Thursday, December 17th, 2009

http://zuzara.com/blog/2009/11/01/tpcc-mysql-rough-benchmark-for-amazon-rds/

I tried to do tpcc-mysql benchmark for Amazon RDS. Before do that, did the same test for EC2 small instance.

This is a pretty rough benchmark, but I can say EC2 small instance and RDS small instance have the same performances as CPU and memory are the same spec. RDS is about 30% expensive. (EC2=$0.085, RDS=$0.11/h)

Running Databases on AWS

Monday, November 16th, 2009

http://aws.amazon.com/running_databases/


This page contains the following categories of information.

* Amazon EC2 Relational Database AMIs
* Amazon Relational Database Service (Amazon RDS)
* Amazon SimpleDB
* Storage Practices and Backups
* Security
* Documentation and Case Studies

Anyone used Amazon EC2 with a database or other high IO operation?

Sunday, November 15th, 2009

http://news.ycombinator.com/item?id=943046

We run all of reddit on ec2, which includes a bunch of postgres servers. Each one is running with a single EBS. However, I’ve heard horror stories of people trying to run much less busy databases and having lots of problems, usually with MySQL.

Those databases are all on XLarge instances, so there is minimal sharing, and we’ve also gone to great lengths to make sure all of our normal queries are in indexes, so the disk gets hit less.

We also have a read slave for every database to alleviate read loads.

One thing you might want to do is run ‘iostat -xtc’ on your current box and put that in a log file. Then go back and analyze it and see what your average and peak reads and writes are. Amazon’s max for a single EBS appears to be about 1000 ops / second (at least, that is what we were doing when they told us we maxed out the performance of the disk).

Good luck!

Edit: I forgot to mention that on all the database disks, we use ext2 and noatime. Both decrease the total number of writes necessary, and have very little downside (the biggest being that you have to fsck on a crash).

RightScale: MySQL Database Setups

Tuesday, November 10th, 2009

http://support.rightscale.com/03-Tutorials/02-AWS/02-Website_Edition/2.1_MySQL_Setup

There are two different ways of setting up a redundant MySQL database on Amazon EC2. In both cases, there will be a Master-DB and Slave-DB with replication for failover and recovery. The core difference between each setup is how the backups are saved.

Running MySQL on Amazon EC2 with Elastic Block Store (another take)

Monday, November 9th, 2009

http://jframeworks.com/blog/2009/11/08/running-mysql-on-amazon-ec2-with-elastic-block-store-another-take/

I have been following ‘Eric Hammod’ article on how to setup MySQL so that, it survives EC2 instance termination or restarts. That article is one of best article but it’s too much for my requirements. So I came up with some more simple steps to host MySQL files on EBS volume. Many parts of Eric’s article still applies like how to create EBS volume and how to create snapshot of EBS.

LAMP on EC2 (Parts 1-10)

Friday, October 30th, 2009

http://www.ardentsoft.com/blog/tag/lamp-on-ec2

Part 1: Setting up Amazon Web Services
Part 2: Setting up a Persistent Volume
Part 3: Starting and Configuring the Instance
Part 4: Mounting a Persistent Volume
Part 5: Configuring MySQL
Part 6: Configuring Apache
Part 7: Configuring PHP
Part 8: Setting up an Elastic IP Address
Part 9: Setting up Snapshots
Part 10: Generating a Custom AMI

Amazon RDS and Django

Tuesday, October 27th, 2009

http://www.lonelycode.com/2009/10/27/amazon-rds-and-django/


Amazon has recently released a long-awaited feature addition to it’s Web Services infrastructure: Relational Databases. Having for a long time only had SimpleDB on offer (non-relational and weird to implement), it’s always been something of a struggle to get MySQL running on EC2.

Traditionally one would have to set up a block storage device, mount it, hack the mySQL configuration to use the mounted EBS volume for storage (not to mention messing around with XFS locking and snapshotting the DB when the instance goes down). All in all a pain to implement and maintain.

Now with Amazon’s Relational Database Service, you get a MySQL database, hosted in the cloud – auto backed-up, patched and running on a scalable infrastructure (you can re-size it to your hearts content) and at the same time independent of your instances – meaning no more messing around with block storage for your database.

Now RDS is actually completely compatible with all mySQL tools, so interfacing it with django is stupid simple – but, for those that want a quick walkthrough, I’ve prepared one below, from getting the service running to getting django to use it:

FathomDb

Tuesday, October 27th, 2009

http://fathomdb.com/about/home

FathomDB is the easiest and best way to run a database on EC2

* Database-as-a-service: pay only for what you use, no up-front costs
* Relational: standard databases like MySQL means nothing to rewrite or re-learn
* Managed: we do the setup, backups and monitoring
* Designed for EC2: out-of-the-box best practice for databases in the cloud
* Deep insight: track and improve performance down to the query level

Amazon Launches Hosted MySQL Database Cloud Service

Tuesday, October 27th, 2009

http://www.techcrunch.com/2009/10/26/amazon-launch-relational-database-cloud-service/

Amazon has launched a hosted relational database service, Amazon RDS, as part of the suite of services available at AWS. The new service is a hosted MySQL database instance with the full capabilities and access rights as a normal self-hosted DB.