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

unable to fully utilize multiple cores in async mode #51

Open
ouvaa opened this issue Apr 5, 2024 · 1 comment
Open

unable to fully utilize multiple cores in async mode #51

ouvaa opened this issue Apr 5, 2024 · 1 comment

Comments

@ouvaa
Copy link

ouvaa commented Apr 5, 2024

Describe the bug

  1. for async mode, not technically a bug but i'm having max 1,500,000 req/s on my 12 core amd laptop ubuntu 22.04

if i put 2 instances, it will basically halved at 750000 req/s each and 3 instances uses 500,000 req/s etc.

how to push for max req/s using multiple instances?

also getting this error after running for a long time with multiple instances where by ram is showing 0.0% usage using top -c

pls suggest ways to workaround the issues.

Warn 2024-04-04 20:02:46.910525 stream.go:257 server session stream fallback seqID:24 len:1043 reason:share memory not more buffer, sendBuf.isFromShareMemory: true
  1. also, for sync mode, trying to use multiple cores of golang. how to make this possible? i tried to run multiple server instances inside 1 golang program by having 1 go routine listening to 1 uds socket per cpu core but it doesnt seem possible. possible to show the code of how to do so?

1 goroutine per cpu core running listening in as server

many clients sending to different uds socket per core of the server

To Reproduce
commenting
//runtime.GOMAXPROCS(1)
in
shmipc_server example

Expected behavior
able to use multiple core

Environment:
ubuntu 22.04 go 1.22

@ouvaa ouvaa changed the title commenting //runtime.GOMAXPROCS(1) will show fallback unable to fully utilize multiple cores in async mode Apr 5, 2024
@ouvaa
Copy link
Author

ouvaa commented Apr 10, 2024

i've set on the client side
conf.SessionNum = 12
to match number of core of laptop which is 12 which "seemed to work" for now but not sure if this should be the way it is done.

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

No branches or pull requests

1 participant