-
-
Notifications
You must be signed in to change notification settings - Fork 604
osv memcached
osv-memcached application is a pilot that demonstrates the power of OSv in regard of bypassing the OS layers. It partially implements the memcache protocol by connecting to the FreeBSD PF hook and handling the memcache requests.
- UDP protocol only.
- GET and SET verbs only.
- Supports a single request per-packet only.
- User may limit the maximum size of totally cached data.
- IP fragmentation IS NOT supported.
- Get OSv:
- git clone https://github.com/cloudius-systems/osv.git
- Follow the instructions in osv/README.md
- Build the osv-memcached image:
make image=osv-memcached
osv-memcached server will use all available memory in the Guest. It will shrink the cache if Guest runs out of memory (for any reason).
It will free the least recently used entries first.
The shrinking will be triggered by the OSv's memory::shrinker
framework, which invokes shrinking of all registered agents (osv-memcached is one of them) when the amount of free memory in the system falls below some threshold.
For example, to run a single vCPU OSv instance with 4GB memory one may run the following command:
sudo ./scripts/run.py -n -v -V -c1 -m4G -e "/tools/osv-memcached.so"
After that one may run any memcache client he/she wants. For example one may use memaslap benchmark:
memaslap -s <server IP> -T 3 --concurrency 120 -t 5s --udp