You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the super-detailed issue. Unfortunately, this is a known and unavoidable side-effect of our switch to support metric time-series in k6 v0.41.0 - every unique URL will now create a new time series, and thus use up a ton of RAM... 😞 Previously, this used to be a problem only for certain outputs, since k6 itself didn't keep track of different time series, but we now need to do it for a whole bunch of reasons.
Fortunately, there is an easy workaround - use URL grouping. In your case, unless you want to set the name tag manually, the only thing that you need to change is to use the http.url helper for the template literal, like this:
For more details, you can read up the previous discussion on the topic in #2762. I'll close this issue, since grafana/k6-docs#883, #2765 and #2766 track the actionable parts of it that we plan to fix.
Brief summary
I noticed that with two latests versions of k6
0.41.0
&0.42.0
it started to consume a lot of memory for no reason.Deep investigation pointed out that this happens with http calls when url is random on each call. E.g.
This will cause process to consume over 2GiB in 10 minutes with only 100 VUs
k6 version
0.41.0 & 0.42.0
OS
macOS
Docker version and image (if applicable)
Docker 4.3.2, Images grafana/k6:0.41.0 & grafana/k6:0.42.0
Steps to reproduce the problem
0.41.0
First experiment: http://test.k6.io
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.41.0 run /app/test.js
Second experiment: http://test.k6.io?a=b&c=d
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.41.0 run /app/test.js
Third experiment: http://test.k6.io?a=${randomString(10)}&c=${randomString(10)}
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.41.0 run /app/test.js
Memory consumption over 3 tests, MiB
0.40.0 (previous version where this works fine)
First experiment: http://test.k6.io
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.40.0 run /app/test.js
Second experiment: http://test.k6.io?a=b&c=d
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.40.0 run /app/test.js
Third experiment: http://test.k6.io?a=${randomString(10)}&c=${randomString(10)}
script.js
docker run -e K6_STAGES="1m:100,10m:100" -v current_dir_with_script:/app -i grafana/k6:0.40.0 run /app/test.js
Memory consumption over 3 tests, MiB
Conclusions
As you can see, there is no such a drastically jump in memory consumption with version 0.40.0 with random url's in get requests
ps. I also tested with v 0.42.0, situation is the same.
Expected behaviour
stable memory consumption around 150 MiB over the test
Actual behaviour
memory consumption growth exponentially over 2 GiB
The text was updated successfully, but these errors were encountered: