Amazon RDS Small 每秒可以对主键进行 200 次时间戳更新吗?
我试图了解小型 RDS 实例类型可以处理多少负载。
我知道这是非常主观的,但考虑到它是在主键上完成的并且正在更新时间戳字段,该表大约有 500,000 行,这会是一个问题吗?假设这是数据库中唯一的表。
如果这会成为问题,那么对于大型实例怎么办?
对于小型/大型实例可以处理多少个此类更新的合理估计是多少?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答:是的,很容易。
长答案:
UPDATE tbl SET date='$now' WHERE pk='$key'
对于现有主键的不同随机打乱列表这会将实例 CPU 固定在100% 并保持稳定的更新率,略高于每秒 2000 次更新。写入 I/O 运行速度约为 600 IOPS。由于它是 CPU 限制的,如果您使用准备好的语句或批处理插入,我确信您可以在 CPU 耗尽之前做得更好。
Short answer: Yes, easily.
Long answer:
mysql
commandlines in parallel doingUPDATE tbl SET date='$now' WHERE pk='$key'
for different random-shuffled lists of existing primary keysThis 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.