计算数据库过载时的性能
我不知道这是否是这个问题的正确位置,但它来了:
我有一个经过测试的 db 函数,可以处理大约 3000 个请求/分钟。问题是这个计算只给了我函数的最佳性能(~18ms/请求)。当请求是两倍、三倍或n倍时,如何计算性能?
I don't know if this is the right place for this question, but here it comes:
I have a db function that I tested and can handle about 3000 requests/minute. The problem is that this calculation just gives me the optimal performance of the function (~18ms/request). How do I calculate the performance when the requests are twice, triple or n-times as that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试创建多个线程或进程,它们都尽可能快地调用该函数。最好使用与生产环境中使用的相同数量的线程。
try creating multiple threads or processes that all call the function as fast as they can. preferably use the same number of threads that would be used in a production environment.