pai icon indicating copy to clipboard operation
pai copied to clipboard

How many jobs can be run simultaneously

Open hellocandy opened this issue 7 years ago • 11 comments

Organization Name: Advantech

Short summary about the issue/question: We submit job to openpai simultaneously, in theory 22 job can be running at the same time, however only 10 jobs running at the same time. The job consumes 4G Mem and 1CPU. We have 2 woker nodes, each node have 46G mem and 32 CPU. How to calculate the count of jobs that can be running at the same time? And in what condition will the job change from waiting to runing?

Brief what process you are following:

How to reproduce it:

OpenPAI Environment: Cluster, one master and two worker node.

  • OpenPAI version: 0.8.3
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Hardware (e.g. core number, memory size, storage size, GPU type etc.): 46Mem/32Cpu for each worker node.
  • Others:

Anything else we need to know:

hellocandy avatar Mar 22 '19 04:03 hellocandy

I found that when submit one job, two container will be created, and then the job consume double of the resources. For example, the job use 1 CPU and 4G Mem, while the actual resource used is 2CPU and 8G Mem.

hellocandy avatar Mar 22 '19 07:03 hellocandy

@hellocandy Not double, just additional 1 cpu and 4G memory. That's because our scheduler is based on YARN, which needs an extra container for every job. So a job with m CPU, nG Mem actually consumes m+1 CPU ,n+4G memory. BTW, we reduce the overhead to 1 CPU and 1G memory in #2072

mzmssg avatar Mar 22 '19 07:03 mzmssg

Is it possible to reduce the memory used by YARN for each job? The job apply for 1 CPU and 1G memory, while the YRAN consumes mush more than the job.

hellocandy avatar Mar 22 '19 08:03 hellocandy

1G is the minimum scheduling granularity. So 1 CPU and 1G memory are the minumum overhead in current architecture.

mzmssg avatar Mar 22 '19 08:03 mzmssg

How to config the YARN to consume 1 CPU and 1G memory?

hellocandy avatar Mar 22 '19 08:03 hellocandy

I find a strange phenomenon,I submit job that consume 1 CPU and 8G memory, and 12 job can be run at the same time , while this is above our total resource (92G). How to explain this phenomenon?

hellocandy avatar Mar 22 '19 08:03 hellocandy

@hellocandy It's PAI configuraion, please upgrade to 0.10. For the running status, please refer to #2022, we also refined them in 0.10, in which there should be some waiting jobs.

mzmssg avatar Mar 22 '19 08:03 mzmssg

I submit job that consume 1 CPU and 8G memory again, and 13 job can be run at the same time , while this is above our total resource (92G). How to explain this phenomenon?

hellocandy avatar Mar 23 '19 01:03 hellocandy

Some of running jobs are actually waiting in queue. We fix the job state issue in 0.11.y

fanyangCS avatar Mar 23 '19 03:03 fanyangCS

The YARN for each job consumes 1G Memory at 0.10, but it seems still too high. Why the limit is 1G ? We want to reduce the memory of YARN to 512M, and we can modify the source code of openPAI to 512M. Is there any possible problem if we modify the resource of YARN as 512M?

hellocandy avatar Mar 25 '19 05:03 hellocandy

@hellocandy Of course such change is acceptable, but we think the stability is the highest priority. We have tested 1G, it works fine for most distributed workloads. But 512M may not.

mzmssg avatar Mar 25 '19 05:03 mzmssg