Docker slowing down with multiple processes

initialy single docker container is working good for less number of parellel processes but when we increase the number of parellel processes to 100-150 the process execution get slows. The processes are getting slow but still the docker is utilizing only 30-40% of cpu.

I have tried following things so to make docker utilize proper cpu and don’t slow down the processes :-

  1. I have explicitly allocated the cpu and ram to the docker container.
  2. I have also increased the number of file descriptors, number of process and stack size using ulimit.

even after doing this two thing still the container is not utilizing cpu properly. I am using docker exec to start multiple processes in single running container. Is there any efficient way to use single docker container for executing multiple processes ?

The configuration i am using is
Server - aws ec2 t2.2Xlarge ( 8 core, 32 gb ram)
Docker version - 18.09.7
Os- ubuntu 18.04