My http server is connected with a 1G network, when I run a k6 test with only 3 VUs (which to me seems like nothing) it fills the entire network bandwidth, hence making some requests slower and making the whole test inaccurate. I wanted to see how reliable is my app and if it responds fast under heavy load but I am unable to generate load heavy enough on 1G network
I feel like my thinking and the entire idea how this works is wrong, can someone please enlighten me?
Hi @wandal, welcome to the community forum !
I take it that by
1G you mean 1 gigabit per second?
If so I have also been able to that when I was testing how many requests k6 can make in my local network to an nginx server. This though also meant I was doing A lot of requests and the nginx was just serving static files. Both of those things are really “light” so they take no time at all, so if you are testing just over a single switch, then k6 gets responses back really fast … and it is just suppose to loop over and do more, so this is what it does.
So this will be as slow as the combination of all the things and having a somewhat fast connection just means you will be able to get more traffic, but this still means that you can saturate it. After all, 1Gbps is still 125 megabytes per second so if you have 10 megabytes bodies and you 3 VUs at 4 iterations per each VU you are 120 megabytes per second.
I would argue that this isn’t what really will happen if you are load testing an API call where some custom logic will need to generate the response (even if it’s a lot smaller) and possibly will need to ask a database for a response and so on. Although arguably your app might be responding fast enough to a few calls and saturating the network, but with many separate concurrent users it might actually start slow down and not even saturate the network. Or just that there are more users means they have less network bandwidth each. I can’t even guess which one you are hitting without the metrics k6 produces and even then it will depend on knowledge of your app, so you will need to figure out what is going wrong on your own here .
Hope this helps you and good luck.
Hello, thanks for the response. Yes of course I meant the 1 gigabit per second network. You gave me a good hint, the work load is too easy and I must make the workload harder. I am currently downloading a few pages pulling DB data and some static images, there is no question the app is written in a way that it responds very fast even with DB queries
@wandal I would suggest you start by defining what are the performance goals you need your service to meet and go from there. Like @mstoykov explained, k6 can easily saturate the network, but it’s up to you to decide whether that’s a good or a bad thing.
Consider using the arrival rate executors to set a performance target, see if your service can achieve it and accordingly adjust either the test or optimize the service.
First I wanted to see if my app is lacking somewhere, find its weak spots and go from there. Trying to inflate the test now to load the database more without saturating the network