serving icon indicating copy to clipboard operation
serving copied to clipboard

How to test qps for tensorflow model server?

Open yejw5 opened this issue 9 years ago • 3 comments

In my project, use //tensorflow_serving/model_servers:tensorflow_model_server as server, mnist_model for predict and python as client. The mnist_model is generated by //tensorflow_serving/example:mnist_saved_model, and client will print a character '.' when a request callback. The client benchmark in one process is in https://github.com/yejw5/script_benchmark/blob/master/tensorflow_model_serving/mnist/mnist_benchmark_one_process.py. But according to the result printed, it seems that the requests is not continuous. When I run the test with ./mnist_benchmark_one_process.py --server=10.38.11.204:9000 --model_name=mnist --num_tests=10000, the output will pause for a while in about every thousand. If I input enter quikly during benchmark test, the ouput will be like: benchmark_output Is it caused by max connection num? Or the max cache of python callback?

yejw5 avatar Apr 07 '17 02:04 yejw5

With tensorflow CPU 16 core server to 16 core client with mnist example still only ~25k QPS.

dustinbigham avatar Mar 20 '18 20:03 dustinbigham

A better way to test qps would be to add some sort of counter in the python benchmarking code for every reply, and periodically print it. Even better if it's a richer API which can give you the change in count per second, which is essentially the qps.

vinuraja avatar Mar 27 '18 21:03 vinuraja

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.

If you think we've misinterpreted a bug, please comment again with a clear explanation, as well as all of the information requested in the issue template. Thanks!

Harshini-Gadige avatar Oct 25 '18 17:10 Harshini-Gadige