Hi Pál,
I think you are going about this the wrong way. I don't think Nginx memcached module is suitable for Moodle. Moodle has it's own integration with memcached in the backend, and to quote from the docs for the nginx module docs...
"The ngx_http_memcached_module module is used to obtain responses from a memcached server ... A response should be put in memcached in advance by means external to nginx."
TBH I stopped using memcached for moodle on my raspberypi deployment at moopi.uk (although this is not documented) and instead use a tmpfs with the default 'filesystem' cache for MUC.
As Matteo says your big and quick wins are in Opcache. In addition to that PHP7 gives a ~30% speed boost too if you can use it (I really have no clue when it comes to Gentoo!).