HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85
Just starting hhvm is enough to see the problem. Tested both versions on Ubuntu 14.04 (trusty). Tested 3.14.1 also on Ubuntu 16.04 (xenial), same behaviour.
$ cat /etc/hhvm/server.ini
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 8000
hhvm.server.type = proxygen
hhvm.server.default_document = index.php
hhvm.server.error_document404 = index.php
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
hhvm.server.source_root=/var/www/public
; default log location is stdout/err, which is good for docker
hhvm.log.use_log_file = true
Running with:
$ hhvm -m server -c /etc/hhvm/server.ini
Previous versions (tested on 3.9, 3.12.2, 3.13.2) consume around 90M to boot. 3.9 running wordpress for some months consumes around 170M.
3.14.1 is consuming around 300-340M just to boot.
dmesg | grep -i numa
[ 0.000000] No NUMA configuration found
The defaults for hhvm.jit_a_*_size don't seem to have changed.
Same issue in 3.15
No proxygen here.
I can repro this. It seems to be caused by c2314526 - "Make jit::ProfData thread-safe". I'm seeing about 96MB before and 256MB after.
In c2314526e1424c95e028755e3ccb8e84507627f8 @swtaarrs made a bunch of data structures atomic, and in the process also gave them default allocation sizes which were probably not very appropriate for small sites.
These sizes became configurable in cb4a7e5bbbb83cd624b65146f4aa4b72b7077cda (which doesn't look like it's in 3.14 or 3.15 unfortunately). If you're running master I suggest adjusting hhvm.func_count_hint and hhvm.pgo_func_count_hint. We can probably merge cb4a7e5bbbb83cd624b65146f4aa4b72b7077cda into 3.15.1, I'm not sure if it will pick cleanly into the 3.14 branch. If you're building yourself you can also adjust kFuncCountHint in hphp/util/atomic-vector.h and rebuild.
Closing since this is intended behavior.
The default sizes I set in cb4a7e5bbbb83cd624b65146f4aa4b72b7077cda are minuscule compared to the old value of kFuncCountHint, so I wouldn't expect people to have to lower them any further (once they have that diff).
@paulbiss If we want to do something for 3.14, we could dramatically lower kFuncCountHint without any of my other changes.
Officially we aren't supporting 3.14 anymore, but I'll monitor this and if there's sufficient interest it would be an easy change to roll.
can you please confirm 3.15.1 will have cb4a7e5 applied?
Confirmed. Just pushed it to the 3.15 branch, whenever we cut next we'll pick it up.
Most helpful comment
Confirmed. Just pushed it to the 3.15 branch, whenever we cut next we'll pick it up.