Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFServing performances #456

Closed
kamei86i opened this issue May 26, 2017 · 4 comments
Closed

TFServing performances #456

kamei86i opened this issue May 26, 2017 · 4 comments
Labels
type:performance Performance Issue

Comments

@kamei86i
Copy link

Hi,

I'm building an application using the Java JNI API (https://www.tensorflow.org/api_docs/java/reference/org/tensorflow/package-summary) and Tensorflow Serving Java GRPC interface. I should switch between these two modalities during normal usage of my application.
I correctly get the same classifications with both modalities, however i'm experimenting a performance difference in favor of the Java JNI interface. With the same model and on the same test cases, i measured that TF serving via GRPC/blocking calls is 20-25 times slower than the JNI calls. Is there something I can do to improve TF Serving performances without using batching?

The model I'm using is a CNN built with keras 2 and Tensorflow 1.1.
I built the tensorflow model server with the latest release 0.5.1 of Tensorflow Serving.

@haiy
Copy link

haiy commented May 27, 2017

I've also met the same difference.With JNI the avg request cost is around 10~15ms,but with serving it would be 200~300ms.

@kovasb
Copy link

kovasb commented May 30, 2017

One experience report: I got a 10x speedup from compiling TF serving as bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.2 //tensorflow_serving/model_servers:tensorflow_model_server

The weird thing is I'm not sure the flags matter for the tensorflow-only aspect, but specifically for TF serving.

@kamei86i
Copy link
Author

I confirm that compiling Tensorflow Serving with this options resolve the problem.

@mahnunchik
Copy link
Contributor

@chrisolston @kirilg @kamei86i Can anyone describe what these options mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:performance Performance Issue
Projects
None yet
Development

No branches or pull requests

5 participants