You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Maged Michael (JIRA)" <ji...@apache.org> on 2016/01/25 15:21:39 UTC

[jira] [Comment Edited] (MESOS-4353) Limit the number of processes created by libprocess

    [ https://issues.apache.org/jira/browse/MESOS-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15115256#comment-15115256 ] 

Maged Michael edited comment on MESOS-4353 at 1/25/16 2:21 PM:
---------------------------------------------------------------

Currently, there is a lower bound of 8 on the number of worker threads. I suggest that if the operator provides an upper bound that is less than 8 (e.g., sets an environment variable LIBPROCESS_MAX_WORKER_THREADS=4), then the provided upper bound overrides the lower bound (in this example, the number of worker threads would be set to 4). The rationale is that not all types of Mesos processes require 8 worker threads.


was (Author: magedm):
Currently, there is a lower bound of 8 on the number of worker threads. I suggest that if the user provides an upper bound that is less than 8 (e.g., sets an environment variable LIBPROCESS_MAX_WORKER_THREADS=4), then the provided upper bound overrides the lower bound (in this example, the number of worker threads would be set to 4). The rationale is that not all types Mesos processes require 8 worker threads.

> Limit the number of processes created by libprocess
> ---------------------------------------------------
>
>                 Key: MESOS-4353
>                 URL: https://issues.apache.org/jira/browse/MESOS-4353
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Qian Zhang
>            Assignee: Qian Zhang
>
> Currently libprocess will create {{max(8, number of CPU cores)}} processes during the initialization, see https://github.com/apache/mesos/blob/0.26.0/3rdparty/libprocess/src/process.cpp#L2146 for details. This should be OK for a normal machine which has no much cores (e.g., 16, 32), but for a powerful machine which may have a large number of cores (e.g., an IBM Power machine may have 192 cores), this will cause too much worker threads which are not necessary.
> And since libprocess is widely used in Mesos (master, agent, scheduler, executor), it may also cause some performance issue. For example, when user creates a Docker container via Mesos in a Mesos agent which is running on a powerful machine with 192 cores, the DockerContainerizer in Mesos agent will create a dedicated executor for the container, and there will be 192 worker threads in that executor. And if user creates 1000 Docker containers in that machine, then there will be 1000 executors, i.e., 1000 * 192 worker threads which is a large number and may thrash the OS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)