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

how to increase the thread count of mock server? #230

Closed
davidmeng opened this issue Feb 12, 2018 · 4 comments
Closed

how to increase the thread count of mock server? #230

davidmeng opened this issue Feb 12, 2018 · 4 comments

Comments

@davidmeng
Copy link

Is there any way to increase the thread count of mock server?
If I use 30 thread to call the mock server, many call don't response in time.
Many thanks.

@davidmeng
Copy link
Author

davidmeng commented Feb 12, 2018

Below are the cost of response time. It seen that the count of thread is 8. how to increase it? (The latency of call is 1 second)
cost 1169
cost 1169
cost 1168
cost 1172
cost 1180
cost 1174
cost 1180
cost 1178
cost 2167
cost 2158
cost 2165
cost 2167
cost 2163
cost 2160
cost 2171
cost 2167
cost 3162

@davidmeng
Copy link
Author

davidmeng commented Feb 12, 2018

com.github.dreamhead.moco.internal.MocoServer

public MocoServer() { group = new NioEventLoopGroup(200); //group = new NioEventLoopGroup(); original code }

200 is the number of thread count. we can increase the thread number.
Hope to add the parameter to set the thread count

@dreamhead
Copy link
Owner

Moco uses Netty default thread count which can be set by io.netty.eventLoopThreads as system property.

Try the following command

java -jar -Dio.netty.eventLoopThreads=200 ...

@davidmeng
Copy link
Author

davidmeng commented Feb 24, 2018

Thank you very much. :) And happy Chinese New Year.

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

No branches or pull requests

2 participants