Skip to content

Open loop sync/async multithreaded testing#1948

Merged
ctiller merged 51 commits intogrpc:masterfrom
vjpai:poisson
Jun 8, 2015
Merged

Open loop sync/async multithreaded testing#1948
ctiller merged 51 commits intogrpc:masterfrom
vjpai:poisson

Conversation

@vjpai
Copy link
Copy Markdown
Contributor

@vjpai vjpai commented Jun 5, 2015

This PR adds the ability to do open-loop testing with various random distributions (though only Poisson makes a lot of sense). You can specify the rate as a load parameter, and the client config proto is expanded accordingly.

Note that using open-loop testing effectively will typically require you to set a greater value for outstanding_rpcs_per_channel than you would with closed loop, as you need some slack to make up for times when the channels aren't able to keep up with natural variations in the random distribution.

What's not supported: benchmarking for open-loop async streaming. This is an uncommonly used method of communication, so there wasn't a strong desire to incorporate the additional complexity required to benchmark it.

vjpai added 30 commits April 21, 2015 12:58
… still be

alive at this time

Conflicts:
	test/cpp/qps/client_sync.cc
Conflicts:
	test/cpp/qps/client_sync.cc
Conflicts:
	Makefile
	build.json
Conflicts:
	Makefile
	test/cpp/qps/client_async.cc
	test/cpp/qps/qpstest.proto
@vjpai
Copy link
Copy Markdown
Contributor Author

vjpai commented Jun 5, 2015

I've asked @dgquintas for a review since he had been reviewing my earlier failed PR before I closed it.
Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These distributions need a few lines of documentation on what the distribution looks like.
I'd even take links to Wikipedia articles :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ctiller
Copy link
Copy Markdown
Member

ctiller commented Jun 5, 2015

What if we had something like:

namespace grpc {
class Alarm {
 public:
  // emits a completion to cq with tag 'tag' on completion
  void Start(CompletionQueue* cq, void* tag, some_time_type deadline);
  void Cancel();
};
}

We'd need a C api to mirror it (grpc_cq_alarm_XXX?), and then we could leverage the existing alarm list implementation to drive it.

@vjpai
Copy link
Copy Markdown
Contributor Author

vjpai commented Jun 5, 2015

That suggestion sounds helpful. I can look over the async code and give you an estimate of how much it would save.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the formatting of these three lines looks funny. Is this how clang-format does it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was courtesy of clang-format.

vjpai added 2 commits June 5, 2015 11:09
Also remove the parameterized constructor for InterarrivalTimer
and only keep the init function.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const & or pointer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better, will just directly place the reference into the code below.

@vjpai vjpai mentioned this pull request Jun 5, 2015
@vjpai
Copy link
Copy Markdown
Contributor Author

vjpai commented Jun 6, 2015

Hi there, any more comments, or is this a go at this point?

@ctiller
Copy link
Copy Markdown
Member

ctiller commented Jun 6, 2015

Can you add a variation of qps_test that sets up and runs a fixed rate test for ten seconds on localhost? It'll let this code get some more miles on Travis.

@vjpai
Copy link
Copy Markdown
Contributor Author

vjpai commented Jun 6, 2015

OK, will do.

On Fri, Jun 5, 2015, 6:27 PM Craig Tiller [email protected] wrote:

Can you add a variation of qps_test that sets up and runs a fixed rate
test for ten seconds on localhost? It'll let this code get some more miles
on Travis.


Reply to this email directly or view it on GitHub
#1948 (comment).

regularly.
Also, convert qps_test to test, from benchmark
@vjpai
Copy link
Copy Markdown
Contributor Author

vjpai commented Jun 8, 2015

So, the new tests are in. The tests themselves pass, but coveralls seems to be stuck.

ctiller added a commit that referenced this pull request Jun 8, 2015
Open loop sync/async multithreaded testing
@ctiller ctiller merged commit ba9df85 into grpc:master Jun 8, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 31, 2019
@lock lock bot unassigned dgquintas Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants