Closed carrejoe3 closed 1 year ago
Hi @carrejoe3 👋,
Artillery needs open file descriptors at certain points of the test to work, and Lambda has a limit of 1024 file descriptors. Essentially, you're attempting to run too much arrivalRate
on each Lambda function, causing EMFILE issues.
Try to distribute your test over more workers (potentially substantially more) by increasing --count
, and it should work.
Hi @carrejoe3 👋,
Artillery needs open file descriptors at certain points of the test to work, and Lambda has a limit of 1024 file descriptors. Essentially, you're attempting to run too much
arrivalRate
on each Lambda function, causing EMFILE issues.Try to distribute your test over more workers (potentially substantially more) by increasing
--count
, and it should work.
Thanks @bernardobridge, is there any sort of rough mapping of how many workers you need per 100 requests? I know it would depend on the connection times but any info would be great, thanks.
Hey @carrejoe3, it depends more on how heavy the requests and custom logic is. So the right answer is you may need to do a little bit of trial and error to get the sweet spot right for your test.
In a previous company where I used Artillery, we used to limit things to no more than 200-250 requests per worker, but that was in Fargate which has different and more generous limits, and we were also being rather conservative.
There should be no problem with you just going quite high on the workers though, as Lambda is quite scalable and cheap, and you aren't running for a long time. So in your position I'd probably go 5x on the workers (and 5x less on arrivalRate per worker), and tune up or down from there.
Hey @carrejoe3, it depends more on how heavy the requests and custom logic is. So the right answer is you may need to do a little bit of trial and error to get the sweet spot right for your test.
In a previous company where I used Artillery, we used to limit things to no more than 200-250 requests per worker, but that was in Fargate which has different and more generous limits, and we were also being rather conservative.
There should be no problem with you just going quite high on the workers though, as Lambda is quite scalable and cheap, and you aren't running for a long time. So in your position I'd probably go 5x on the workers (and 5x less on arrivalRate per worker), and tune up or down from there.
Awesome okay thanks for the info. So requests aren't automatically split between workers, you have to divide the requests by the amount of workers you have to achieve the desired RPS?
Yes @carrejoe3, that's correct. Each Lambda or Fargate worker will run one copy of the Artillery script you define.
So if your intention was to get 2200 arrivalRate
total, you need much less workers, you could try 220 with 10 workers to start with, for example.
Version info:
Running this command:
I expected to see this happen:
I am running the command above inside a CodeBuild project. I'm trying to generate 2200 RPS using the test file below.
Instead, this happened:
For each of the workers (10 in my case) I get the following output before the test begins:
The load test then runs, however the desired RPS isn't reached and there are a lot of EMFILE errors:
Files being used: