什么被认为是单个服务器请求的快速性能? [英] What is considered fast performance for a single server request?

查看:67
本文介绍了什么被认为是单个服务器请求的快速性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在进行数据库调用和 Internet 时涉及多个因素,但我严格指的是处理请求的方法,而不是到客户端的往返.我正在使用秒表来获得平均范围,但我不知道什么通常被认为是快速或体面的性能.10 毫秒 500 毫秒?

I understand there are several factors involved when making db calls and internet, but i am referring strictly to the methods processing the requests, not the roundtrip to the client. I am using stopwatch to get an average range but i do not know what is generally considered fast or decent performance. 10ms 500ms?

推荐答案

这是一个非常主观的问题,但我认为它是有效的.我们都知道 4 MPH 对汽车来说很慢,而 150 MPH - 非常快.现在让我们回到服务器.对数据库的快速(索引)调用大约需要 20 毫秒.假设我们需要 5 个.存储延迟也大约为 5-10 毫秒,数据吞吐量为每秒数十兆字节.假设我们需要读取 1Mb.假设需要 50 毫秒.10毫秒的CPU足以在各种地图中进行数十次搜索.10-20 足以有效地填充结果的某些模板.所以我们得到 20*5(对于 DB)+50(文件系统)+10(在内存搜索中)+20(模板填充).180 毫秒.所以非常非常粗略地,我们可以假设高效的服务器,不超载,不过度扫描数据应该有大约 200 毫秒的响应时间.从上面我们还可以假设得到少于 50 - 非常具有挑战性.当然,以上都取决于很多因素,但这篇文章的目的是——给人一些感觉什么是快什么是慢.

It is really subjective question, but I think it is valid. All of us know that 4 MPH is slow for the car, while 150 MPH - very fast. Now lets back to servers. The fast (indexed) call to the DB takes about 20 ms. Let say we need 5 of them. Storage latency is also about a 5-10 milliseconds with data dozens of megabytes per second throughput. Let say we need to read 1Mb. It should take let say 50 milliseconds. 10 milliseconds of CPU is enough to make dozens of searches in the various maps. 10-20 is enough to efficiently fill some template of the result. So we get to sum 20*5 (for DB) + 50 (file system) + 10 (in memory searches)+20 (template filling). 180 milliseconds. So very very roughly we can assume that efficient server, not overloaded, not doing excessive scans over data should have around 200 milliseconds respond time. From above we can also assume that get less then 50 - is very challenging. Of course all above is depends on many factors, but the goal of the post - to give some feeling what is fast and what is slow.

这篇关于什么被认为是单个服务器请求的快速性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆