How to load partially the cpu cores while executing k6 load test?


I use the following scenario:

main_scenario: {
     executor: 'ramping-arrival-rate',
     startRate: 50,
     timeUnit: '1s',
     preAllocatedVus: 50,
     maxVus: 2000,
     stages: [
         { target: 500, duration: '5m' } ,
         { target: 1000, duration: '5m' } ,
         { target: 1500, duration: '5m' } ,
         { target: 2000, duration: '5m' } ,
     exec: 'frontend',

to execute load tests with ramping. I expect the test to distribute the load equally to the CPU cores. Which of the k6 scenarios will help ?

k6 by default should use all of the cores on your machine. Is that not the case already when you run the test?

I expected that k6 tool would use each of the CPU cores partly. Our DevOps engineer wants the test to load CPU cores partly. Is it possible to do ?

I don’t understand what you mean by “CPU cores partly”, sorry :confused: please explain exactly what you want to do and what’s the current k6 behavior that disturbs you.