TechEmpower / FrameworkBenchmarks

Source for the TechEmpower Framework Benchmarks project
https://www.techempower.com/benchmarks/
Other
7.63k stars 1.94k forks source link

Limit the amount of memory the framework container can use #4493

Closed michaelhixson closed 5 years ago

michaelhixson commented 5 years ago

Limit the amount of memory that any framework's docker container can consume. Ideally, the framework will be able to use almost all available memory, but the toolset will ensure that just enough memory remains on the system for it to be functional. A framework with a memory leak should be unable to crash the toolset.

We don't want to hard-code system-specific memory limits anywhere. This feature should set a dynamic limit for the container based on the resources available on the host. For example, the limit might be available_memory * 0.95 or available_memory - 500mb.

I don't have an opinion on what exactly should happen when the framework reaches the limit as long as the toolset doesn't crash or exit (when in benchmark mode).

Currently, php/codeigniter is an example of a framework that appears to consume all available memory and then possibly crashes the toolset. Citrine manages to plow through this (though SSH session become unresponsive), but Azure cannot recover. Therefore, you could test this feature against the current version of our php/codeigniter implementation. The current commit is https://github.com/TechEmpower/FrameworkBenchmarks/commit/813d3ab452a6528dc058c885f1e1a214b184a0d1

This feature could impact performance of some frameworks so if we implement it, we should call this out in the blog post for the next round.

michaelhixson commented 5 years ago

I guess this is fixed: https://github.com/TechEmpower/FrameworkBenchmarks/pull/4494