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

Tweaks for API Nodes #550

Open
abitmore opened this issue Dec 23, 2017 · 4 comments
Open

Tweaks for API Nodes #550

abitmore opened this issue Dec 23, 2017 · 4 comments

Comments

@abitmore
Copy link
Member

abitmore commented Dec 23, 2017

Learnt one more trick to improve performanceresponse time for API nodes (do it before starting a node):

sudo sysctl -w net.core.somaxconn=65535
ulimit -n 65536

Need to document this somewhere.

Benchmark data is welcomed.

//Update:
According to https://www.nginx.com/blog/tuning-nginx/:

  • net.core.somaxconn – The maximum number of connections that can be queued for acceptance by NGINX. The default is often very low and that’s usually acceptable because NGINX accepts connections very quickly, but it can be worth increasing it if your website experiences heavy traffic. If error messages in the kernel log indicate that the value is too small, increase it until the errors stop.

Note: If you set this to a value greater than 512, change the backlog parameter to the NGINX listen directive to match.

And there are more info about rate-limiting on the page. Also quoted here: #843 (comment)

More info: https://steemit.com/witness-category/@someguy123/guide-optimise-your-rpc-server-for-better-performance

@abitmore
Copy link
Member Author

OP updated.

@pmconrad
Copy link
Contributor

That setting doesn't increase performance, it only expands the connection queue so that fewer connections will be rejected. This is mostly useful if you have many short-lived connections, probably less so for our websocket-based API.

@abitmore
Copy link
Member Author

@abitmore
Copy link
Member Author

Use ulimit -n 65536 to enable more connections.

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

No branches or pull requests

2 participants