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

Add gRPC load test for allocation service #1867

Conversation

ilkercelikyilmaz
Copy link
Contributor

What type of PR is this?
/kind documentation

What this PR does / Why we need it:
This adds a sample grpc load test client for the allocation service.

Which issue(s) this PR fixes:
Provides allocation load test client and instructions

Special notes for your reviewer:

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 06927514-2130-40bf-a55c-9e016d3065c7

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Outdated Show resolved Hide resolved
test/load/allocation/grpc/allocationload.go Outdated Show resolved Hide resolved
test/load/allocation/grpc/README.md Show resolved Hide resolved
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 1d20b468-10e5-4162-a018-b7506d92511f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-f224beb

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 77dc3ef7-2f28-4be8-a24c-4c9020cccd9f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-ee41749

panic(err)
}

grpcClient := pb.NewAllocationServiceClient(conn)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the gRPC client be created within the go routing for per client?
That would be a closer per client simulation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried it inside the loop and performance was same. See the update

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the change. You should also add dial to the per client go routine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That reduces the throughput. We can consider different test such as 5 MM client (e.g one per continent) with concurrent allocations using the same client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the change. With 40 clients, we get few more errors (still reasonable). To allocate 5000 GSs with 40 clients, it takes ~70 secs. To increase throughput, we probably need more allocator service replicas

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if you only use one connection, that connection goes to the same pod, therefore you are not testing multiple clients/pods.

Copy link
Member

@markmandel markmandel Oct 27, 2020

Choose a reason for hiding this comment

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

I think if you only use one connection, that connection goes to the same pod, therefore you are not testing multiple clients/pods.

This is an interesting question actually. But a couple of thoughts:

  1. I think you are right @pooneh-m - and we want to test across multiple pods. But I'm not sure if that's the requirement for this PR.
  2. Do we expect someone is going to have 50 matchmakers? Seems unlikely - so having a single client may actually make sense, since that's what most architectures will have (or at least, a very low number)
  3. (Separate to this PR) Should we look at how we can make it easier to better implement gRPC load balancing? Some resources:
    1. https://grpc.io/blog/grpc-load-balancing/
    2. https://blog.nobugware.com/post/2019/kubernetes_mesh_network_load_balancing_grpc_services/
    3. https://kubernetes.io/blog/2018/11/07/grpc-load-balancing-on-kubernetes-without-tears/
    4. https://itnext.io/proxyless-grpc-load-balancing-in-kubernetes-ca1a4797b742
    5. https://cloud.google.com/solutions/exposing-grpc-services-on-gke-using-envoy-proxy

If so, this sounds like something we should track in a separate issue for discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is a good discussion.

The current load test client, creates one connection per client so it should leverage all the pods. The performance is more or less so keeping it as is.

Copy link
Member

Choose a reason for hiding this comment

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

Started an issue: #1872

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: c33e9c49-c98f-4e61-9ad0-57ec209c9a40

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Member

Linter fail:

make[1]: Leaving directory '/workspace/build'
docker run -t -e "TERM=xterm-256color" -e "GO111MODULE=on" --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm -v /workspace:/go/src/agones.dev/agones -v /workspace/build//.gomod:/go/pkg/mod -v /workspace/build//.gocache:/root/.cache/go-build -w /go/src/agones.dev/agones  agones-build:724013197f bash -c \
	"golangci-lint run ./examples/... && golangci-lint run --timeout 15m ./..."
test/load/allocation/grpc/allocationload.go:98:12: Error return value of `conn.Close` is not checked (errcheck)
	conn.Close()
	          ^
Makefile:331: recipe for target 'lint' failed
make: *** [lint] Error 1

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 85e728d4-b108-4bfa-b389-c46bb3312047

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d6fce878-c83e-45dd-954a-ab0bc7a90b7a

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-500d8ef

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 1a15fae9-f3cb-4e40-b4fa-19a820f2ceea

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-711a1ca

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c7888bc3-3fbe-4560-85de-08aac01d0618

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-3439241

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8cdcc050-5a6b-470a-914d-716eadf3bfa9

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-9122913

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2204b1ae-acc5-4174-9bf0-ce634e95b0e5

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-ae480c2

@markmandel
Copy link
Member

Other than that one small nit in the fleet.yaml, this is good to go for me!

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: fef813d5-673d-45ff-9964-b0ad00a2a6c7

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-f69c05a

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 78da6162-e170-4345-bfae-9d2294846234

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-71e3e32

@markmandel
Copy link
Member

LGTM! Anything left outstanding for you @pooneh-m or @roberthbailey ?

Copy link
Contributor

@pooneh-m pooneh-m left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding the load test @ilkercelikyilmaz! Very useful.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ilkercelikyilmaz, pooneh-m

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 57474ca2-9588-4533-9de3-58ea42371541

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/1867/head:pr_1867 && git checkout pr_1867
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.10.0-6ba7e4a

@ilkercelikyilmaz ilkercelikyilmaz merged commit 7bd7139 into googleforgames:master Oct 28, 2020
@markmandel markmandel added this to the 1.10.0 milestone Nov 3, 2020
@markmandel markmandel added area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/performance Anything to do with Agones being slow, or making it go faster. kind/feature New features for Agones labels Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/performance Anything to do with Agones being slow, or making it go faster. cla: yes kind/feature New features for Agones size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants