Is there a way to change my K6 cloud test server instance size

Hi,
We have ran couple of tests already with existing K6 cloud servers (m5.large), but all these tests have failed due to K6 cloud instance not able to handle the memory usage. Our tests basically return huge amount of data so we need high end test servers.
Is there any way we can chose our cloud servers like m5.4xlarge instead of the default m5.large.

What exactly are you doing with the data? Are you parsing it afterwards, or just downloading it to measure how long that took?

Because if it’s the second, then you can use the discardResponseBodies option, so that k6 won’t keep the huge response bodies in memory, it will just download them but immediately discard any data it receives. k6 will still measure everything as it should, it just won’t use any unnecessary RAM.

If have some responses you care about parsing, you can specify responseType: 'none' just in the params object of the HTTP requests you don’t care about, to discard their response bodies. Or, alternatively, you can specify the discardResponseBodies: true global option and explicitly specify responseType: 'text' for the requests you care about… :man_shrugging:

Everything is flexible, and unless you care about parsing or processing huge HTTP responses in memory, you shouldn’t need servers with more RAM. And if you actually do, please contact the cloud support at support@k6.io and they will help with that.

1 Like