开发者

How can I measure the server utilization?

How can I measure the server utilization in terms of requests per unit o开发者_StackOverflow中文版f time (lets say one hour), assuming the server's maximum capacity is known (for example, 1000 requests per hour)? I know the equation will be:

utilization = Number of executed requests by server / server capacity 

But how can I measure the requests sent from a client to a server? I need a valid equation to define a request please.


This cannot be answered as "request" in a client/server model cannot be identified without knowing the protocol. To illustrate, multiple HTTP requests can be sent in one connection. UDP based protocols do not use connections at all.

Most general description I can come up with to define a request in an unidentified client/server protocol is the number of messages initiated by the client that require a response by the server. It is a observed variable, not a derivative.

In a program you would obtain this variable via a callback or RPC to the server in question or a program that would be able to provide this variable by inspecting logfiles.


For utilisation you can get all you need from the "sar" utility.

However "request" will be very specific to the software you are running. For instance if you are running Apache web server, by default, it will log each request and you can scan these logs to extract you request data.

However be aware that these are "technical" requests and may not conform to your users idea of a request. Think Amazon, I may think of my book order as one "request", Amazons server will log this as 50 or so http requests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜