I have an RDS instance that is costing me a lot of money. From my account activity on amazon I see that the instance has had about 800,000,000 IO requests over the past 7 days.

To give you a little perspective, my app only gets about 6,000 unique visits a day and it doesn't make that many database connections.

So, what exactly is an IO Request, and why would that number be so unearthly high? I'm willing to do whatever it takes to my app to reduce that cost if necessary, but I'm not sure what's really going on.

I would appreciate your thoughts.

  • Did you find a solution in your case? – Click Upvote Sep 14 '13 at 9:00

Ah, Amazon Web Services. One of the biggest moneysinks available. Very good, but not always cheap. Actually, almost never cheap, and always difficult to estimate expenses.

An IO request is a disk-operation. Be that a read, or a write, you're basically being charged with how much data you're getting off their system. It's insane.

You can estimate the IO Requests you're making, by looking at iostat.

800,000,000 IOrequests in 7 days.. That's ~=1300 IOPS . Wow. That's some wickedfast performance.

As an example, a medium sized website database might be 100 GB in size and expect to average 100 I/Os per second over the course of a month. This would translate to $10 per month in storage costs (100 GB x $0.10/month), and approximately $26 per month in request costs (~2.6 million seconds/month x 100 I/O per second * $0.10 per million I/O).

From http://aws.amazon.com/ebs/ about 90% of the way down the page

If you really want to reduce what this is costing you, it might be time to look at whether RDS is really the best fit for your application and project budget.

If you've only got 6k hits a day, you might do better on cost and performance with a dedicated server (preferably 2 of em, one for DB, one for web services). It's actually a bit more difficult to make that call as you've not said too much more about your application.

  • 3
    When I first experimented with AWS' SimpleDB service, which is something like MongoDB, I ran up a bill of $50 in an afternoon. It's convenient, but almost never cheap. – Tom O'Connor May 9 '12 at 7:44
  • I guess EBS can no longer the reason I see this cost in my bill, "I/O is included in the price of the volumes, so you pay only for each GB of storage you provision." (from the pricing page) ? – hayd Jul 26 '18 at 17:17
  • Sigh, it turns out it's still available in previous generation! – hayd Jul 26 '18 at 17:25

I have an RDS instance that is costing me a lot of money.

"Cloud services" does not mean that stuff is going to cost you pennies. Basically, an I/O request is anything (i.e. a database or an index page) that needed to be fetched from disk. If you have a large database and queries using full table scans, this is by no means surprising. You might consider looking for queries using unindexed columns for filtering by enabling the option to log the "unindexed" queries to the MySQL slow log and adding indexes for the appropriate columns. As you do not have the option to edit the config file directly, use the RDS parameter group configuration to set log-queries-not-using-indexes and query the mysql.slow_log table for log entries.

Also, consider running the MySQL tuning primer script from your AWS instance against the database instance for a general performance analysis to see if a larger instance would help matters due to a larger amount of memory available for caching, alleviating the load on the disk. The script evaluates a number of configuration parameters and performance counters to give some information about possible bottlenecks and provide some generic recommendations.

  • 5
    It is an amazing thing how easily we humans can accidentally make computers do absurdly huge amounts of work. You always have to go back and measure to make sure you didn't inadvertently compel the machine to do something astoundingly stupid. (I once improved the performance of a deployed real-world system by 40% in less than ten minutes (not counting the time to set up a profiled build) by adding one & to its code. Clearly, nobody had ever profiled it.) – David Schwartz May 8 '12 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.