I'm trying to get an idea of how much load a SMALL RDS instance type can handle.
I know this is highly subjective, but given that开发者_运维百科 it's being done on a primary key and a timestamp field is being updated, the table has about 500,000 rows, will this be a problem? Assume this is the only table in the database.
If it will be a problem, what about for a large instance?
What's a reasonable estimate for how many such updates a small/large instance can handle?
Short answer: Yes, easily.
Long answer:
- Mysql 5.5
- Innodb table with ~200k rows
- 128-bit natural primary key
- Datetime column not part of any key
- No other indexes
- Otherwise idle RDS m1.small instance
- 20x
mysql
commandlines in parallel doingUPDATE tbl SET date='$now' WHERE pk='$key'
for different random-shuffled lists of existing primary keys
This pins the instance CPUs at 100% and mantains a steady update rate a little higher than 2000 updates per second. Write I/O ran at about 600 IOPS. Since it's CPU-bound if you're using prepared statements or batching your inserts I'm sure you can do much better before running out of CPU.
精彩评论