Make ExternalCarbonConnectionImpl fiber stack size a gflag (default 64 KiB) Summary: Human Darrien - For the mcrouter folks, let us know if this is a reasonable change to make. We are getting fiber overflows in our tests as of late since D100058297 in our tests. We’re hoping to provide an override in the least invasive way so we can have these tests run again. Let us know if this is reasonable 🙂↕️ The fbjava/privacy/zone:zone_library_test integration tests fail in mode/dev with folly::fibers Fiber stack overflow detected. Root cause: mcrouter/lib/carbon/connection/ExternalCarbonConnectionImpl.cpp‘s ThreadInfo constructs its FiberManager with the default Options (16 KiB stack), which becomes 32 KiB in dev after the stackSizeMultiplier=2 is applied. The AsyncMcClient::create path running on that fiber overflows the 32 KiB stack in unoptimized builds where frames are larger. Added a cacheclient_external_fiber_stack_size gflag defaulting to 65536 bytes (64 KiB), and wired it into the FiberManager::Options.stackSize used by ThreadInfo. The new default gives 64 KiB × 2 = 128 KiB in dev (and 64 KiB in opt), enough headroom for AsyncMcClient::create while still being reasonable for a per-fiber allocation. Operators can tune this further at runtime if needed. Differential Revision: D101644600 fbshipit-source-id: b75d788c6339a76265de634da7e23af83cb70d30
Make ExternalCarbonConnectionImpl fiber stack size a gflag (default 64 KiB)
Summary: Human Darrien - For the mcrouter folks, let us know if this is a reasonable change to make. We are getting fiber overflows in our tests as of late since D100058297 in our tests.
We’re hoping to provide an override in the least invasive way so we can have these tests run again. Let us know if this is reasonable 🙂↕️
The fbjava/privacy/zone:zone_library_test integration tests fail in mode/dev with folly::fibers Fiber stack overflow detected. Root cause: mcrouter/lib/carbon/connection/ExternalCarbonConnectionImpl.cpp‘s ThreadInfo constructs its FiberManager with the default Options (16 KiB stack), which becomes 32 KiB in dev after the stackSizeMultiplier=2 is applied. The AsyncMcClient::create path running on that fiber overflows the 32 KiB stack in unoptimized builds where frames are larger.
fbjava/privacy/zone:zone_library_test
mode/dev
folly::fibers Fiber stack overflow detected
mcrouter/lib/carbon/connection/ExternalCarbonConnectionImpl.cpp
ThreadInfo
FiberManager
Options
stackSizeMultiplier=2
AsyncMcClient::create
Added a cacheclient_external_fiber_stack_size gflag defaulting to 65536 bytes (64 KiB), and wired it into the FiberManager::Options.stackSize used by ThreadInfo. The new default gives 64 KiB × 2 = 128 KiB in dev (and 64 KiB in opt), enough headroom for AsyncMcClient::create while still being reasonable for a per-fiber allocation. Operators can tune this further at runtime if needed.
cacheclient_external_fiber_stack_size
FiberManager::Options.stackSize
Differential Revision: D101644600
fbshipit-source-id: b75d788c6339a76265de634da7e23af83cb70d30
Mcrouter (pronounced mc router) is a memcached protocol router for scaling memcached deployments. It’s a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak.
Mcrouter is developed and maintained by Facebook.
See https://github.com/facebook/mcrouter/wiki to get started.
Currently, we support Ubuntu Bionic (18.04) amd64. Here is how to install it:
Add the repo key:
$ wget -O - https://facebook.github.io/mcrouter/debrepo/bionic/PUBLIC.KEY | sudo apt-key add
Add the following line to apt sources file /etc/apt/sources.list
deb https://facebook.github.io/mcrouter/debrepo/bionic bionic contrib
Update the local repo cache:
$ sudo apt-get update
Install mcrouter:
$ sudo apt-get install mcrouter
See https://github.com/facebook/mcrouter/wiki/mcrouter-installation for more detailed installation instructions.
Mcrouter depends on folly, wangle, fizz, and fbthrift.
The installation is a standard autotools flow:
$ autoreconf --install $ ./configure $ make $ sudo make install $ mcrouter --help
Assuming you have a memcached instance on the local host running on port 5001, the simplest mcrouter setup is:
$ mcrouter \ --config-str='{"pools":{"A":{"servers":["127.0.0.1:5001"]}}, "route":"PoolRoute|A"}' \ -p 5000 $ echo -ne "get key\r\n" | nc 0 5000
(nc is the GNU Netcat, http://netcat.sourceforge.net/)
Documentation: https://github.com/facebook/mcrouter/wiki Engineering discussions and support: https://www.facebook.com/groups/mcrouter
Copyright (c) Facebook, Inc. and its affiliates.
Licensed under the MIT license: https://github.com/facebook/mcrouter/blob/master/LICENSE
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Mcrouter
Mcrouter (pronounced mc router) is a memcached protocol router for scaling memcached deployments. It’s a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak.
Mcrouter is developed and maintained by Facebook.
See https://github.com/facebook/mcrouter/wiki to get started.
Quick start guide
New! Ubuntu package available
Currently, we support Ubuntu Bionic (18.04) amd64. Here is how to install it:
Add the repo key:
Add the following line to apt sources file /etc/apt/sources.list
Update the local repo cache:
Install mcrouter:
Installing From Source
See https://github.com/facebook/mcrouter/wiki/mcrouter-installation for more detailed installation instructions.
Mcrouter depends on folly, wangle, fizz, and fbthrift.
The installation is a standard autotools flow:
Assuming you have a memcached instance on the local host running on port 5001, the simplest mcrouter setup is:
(nc is the GNU Netcat, http://netcat.sourceforge.net/)
Features
Links
Documentation: https://github.com/facebook/mcrouter/wiki Engineering discussions and support: https://www.facebook.com/groups/mcrouter
License
Copyright (c) Facebook, Inc. and its affiliates.
Licensed under the MIT license: https://github.com/facebook/mcrouter/blob/master/LICENSE