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 configuration support to override socket options. #537
Conversation
The Failed Build Job seems to be completely unrelated to the changes that I've made. I'm not able to reproduce consistently. |
@btatnall Why do you need to change the send and receive buffer sizes? I'm fairly reluctant to expose socketopts in this way, as this has not been an expressed need in the user community, and adds substantial opportunity for user error. I'd need to hear a compelling use case or two before adding this complexity - even optional complexity - to Dalli master. |
@petergoldstein I'm on a 10g network and the default buffer sizes are far too small for the size and rate of data that I'm pushing. Because I can't change the buffer sizes I'm seeing frequent timeouts. I do not want to change the system's defaults in rmem_default and wmem_default as that will effect many other applications running on the same machine. Changing buffers on the socket which is experiencing the pressure doesn't effect anything else. I understand exposing Socket::Option may be too much. Would you consider exposing SO_RCVBUF and SO_SNDBUF in the same way that keepalive is exposed? Projects like unicorn expose these options as well.
|
@btatnall I'd find that sort of approach a lot more acceptable. Can you redo the PR with that in mind? |
Given that memcached typically runs on gigabit networks these days, perhaps we should just up the default socket buffer size rather than letting people tune it. What's the default and what do you want to set it to? |
@petergoldstein I'll redo the pull request. Exposing SNDBUF and RCVBUF explicitly. @mperham TBH I'd let the linux distribution determine the default buffer sizes. This isn't a scenario where forcing every client to use the same settings is beneficial. For example, I have a few machines that default to 65Kb and others that default to 262Kb and another that defaults to 12.5Mb and another at 65Mb, which is why using net.core.rmem_default and net.core.wmem_default works for most scenarios |
- only expose sndbuf and rcvbuf socket options
@petergoldstein Changes committed. Travis failures seem completely unrelated (seems a few of these tests fail regularly on Travis). |
Add configuration support to override socket options.
Looks good. Thanks! |
@petergoldstein If you don't mind me asking. What are the conditions to get a new release pushed? |
@btatnall There are no formal conditions per se - it's up to the judgment of the maintainer and their availability. I'm not averse to doing a release with this soon (although I'll probably want to review the issue/PR list before finalizing the release), but I'm pretty busy this week and next. It'd probably have to wait for the 2nd week in June. |
@petergoldstein Is it possible to create a release with just this change in it? |
I need to change the send and receive buffer sizes.