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

Java subscriber throughput limited to 130,000 qps #4485

Closed
dpcollins-google opened this issue Feb 12, 2019 · 5 comments
Closed

Java subscriber throughput limited to 130,000 qps #4485

dpcollins-google opened this issue Feb 12, 2019 · 5 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.

Comments

@dpcollins-google
Copy link

Environment details

  • OS: Ubuntu
  • Java version: 8
  • google-cloud-java version(s): 1.62.0

Steps to reproduce

  1. Run a publisher publishing with > 130,000 qps of 1kb sized messages
  2. Run a subscriber doing minimal work in the callback other than incrementing an atomic counter

Code snippet

Integer BYTES_PER_WORKER = 100000000;
Integer workerCount = 5* Runtime.getRuntime().availableProcessors();
Subscriber.newBuilder(subscription, MinimalMessageReceiver)
                            .setParallelPullCount(workerCount)
                            .setFlowControlSettings(FlowControlSettings.newBuilder()
                                    .setMaxOutstandingElementCount(Long.MAX_VALUE)
                                    .setMaxOutstandingRequestBytes(BYTES_PER_WORKER * workerCount)
                                    .build())
                            .build();

Any additional information below

I've been working to improve the Cloud Pub/Sub loadtest framework. I've been unable to achieve the same throughput in java as I have in golang under the same conditions. I'm unable to increase subscriber throughput on a 16 core machine beyond 130MB/s with 1KB messages, but have been seeing 300+MB/s rates with golang under the same conditions. I've also tried setting the channel provider and executors to different values to no avail. Since the cpu load is stuck at about 35%, perhaps this is a contention or artificial limitation somewhere else in the client library?

In progress branch for updates here https://github.com/dpcollins-google/pubsub/tree/loadtest_updates

@ajaaym ajaaym added type: question Request for information or clarification. Not an issue. api: pubsub Issues related to the Pub/Sub API. labels Feb 12, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 12, 2019

@jadekler, @kolea2 FYI.

Let's discuss this offline. Please include Kir in the conversation.

@jeanbza
Copy link
Member

jeanbza commented Feb 12, 2019

👍

@dpcollins-google
Copy link
Author

sure. dpcollins@. Put something on my calendar.

@sduskis
Copy link
Contributor

sduskis commented Mar 14, 2019

@dpcollins-google, can we close this?

@dpcollins-google
Copy link
Author

dpcollins-google commented Mar 15, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment