Github user canselcik commented on the issue:
https://github.com/apache/trafficserver/pull/1050
I remember seeing the glibc implementation of it basically doing the
`madvise` syscall as well but their behavior really do seem to be different on
both our production and deployment systems, which are RHEL6.5.
We were also suspecting transparent huge pages but we can elaborate on that
potential explanation if this one ends up having shortcomings.
-When `ats_madvice` is a noop, map count doesn't grow unbounded.
(regardless of the `ssl_ticket_enabled` value)
-When this change is made and `posix_madvise` is called with `0`, map count
doesn't grow unbounded. (regardless of the `ssl_ticket_enabled` value)
-If `ats_madvise` calls `madvise` instead of `posix_madvise` (our systems
have both), map count doesn't grow unbounded.
Calls to `ats_madvise` when `ssl_ticket_enabled=0`:
```
ats_madvice(addr=0x7fc4bc022000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4b801f000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4cc01f000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4dc017000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4c8005000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4d41e5000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4a4003000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4b0019000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4a8013000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4a4006000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4e0022000, len=32768, flags=16) = 0
ats_madvice(addr=0x1dd7000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4c8028000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4c408b000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4b8003000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4b401c000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4d801d000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4b8028000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4b0022000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4a401e000, len=32768, flags=16) = 0
ats_madvice(addr=0x7fc4a0003000, len=8192, flags=0) = 0
ats_madvice(addr=0x7fc4d41ee000, len=32768, flags=16) = 0
<pattern repeats as long as more connections are accepted and handed>
```
Calls to `ats_madvise` when `ssl_ticket_enabled=1` (not repeating despite
more connections are accepted and handled):
```
ats_madvice(addr=0x7f05aea43000, len=131072, flags=16) = 0
ats_madvice(addr=0x7f057c003000, len=8192, flags=0) = 0
ats_madvice(addr=0x7f057c01e000, len=4096, flags=0) = 0
ats_madvice(addr=0x7f057c022000, len=20480, flags=0) = 0
ats_madvice(addr=0x7f057c028000, len=94208, flags=0) = 0
ats_madvice(addr=0x7f057c040000, len=28672, flags=0) = 0
ats_madvice(addr=0x7f058c02e000, len=32768, flags=0) = 0
ats_madvice(addr=0x7f05aea01000, len=262144, flags=0) = 0
ats_madvice(addr=0x7f05ae9bf000, len=262144, flags=16) = 0
ats_madvice(addr=0x7f05ae97d000, len=262144, flags=0) = 0
ats_madvice(addr=0x7f055c01d000, len=12288, flags=0) = 0
ats_madvice(addr=0x7f05ae93b000, len=262144, flags=16) = 0
ats_madvice(addr=0x7f05ae8f9000, len=262144, flags=16) = 0
ats_madvice(addr=0x7f05ae8b7000, len=262144, flags=16) = 0
ats_madvice(addr=0x7f055c021000, len=12288, flags=0) = 0
```
Even with the non-stop calls to `ats_madvise` in the `ssl_ticket_enabled=0`
case, if `ats_madvise` is noop, or uses `flags=0` or calls `madvise` rather
than `posix_madvise`, we don't observe the growth in memory maps.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---