Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2330#discussion_r18240775
  
    --- Diff: 
core/src/main/scala/org/apache/spark/network/netty/BlockServer.scala ---
    @@ -74,42 +54,24 @@ class BlockServer(conf: NettyConfig, dataProvider: 
BlockDataProvider) extends Lo
       /** Initialize the server. */
       private def init(): Unit = {
         bootstrap = new ServerBootstrap
    -    val bossThreadFactory = 
Utils.namedThreadFactory("spark-shuffle-server-boss")
    -    val workerThreadFactory = 
Utils.namedThreadFactory("spark-shuffle-server-worker")
    +    val threadFactory = Utils.namedThreadFactory("spark-netty-server")
     
         // Use only one thread to accept connections, and 2 * num_cores for 
worker.
         def initNio(): Unit = {
    -      val bossGroup = new NioEventLoopGroup(1, bossThreadFactory)
    -      val workerGroup = new NioEventLoopGroup(0, workerThreadFactory)
    -      workerGroup.setIoRatio(conf.ioRatio)
    +      val bossGroup = new NioEventLoopGroup(conf.serverThreads, 
threadFactory)
    +      val workerGroup = bossGroup
           bootstrap.group(bossGroup, 
workerGroup).channel(classOf[NioServerSocketChannel])
         }
    -    def initOio(): Unit = {
    -      val bossGroup = new OioEventLoopGroup(1, bossThreadFactory)
    -      val workerGroup = new OioEventLoopGroup(0, workerThreadFactory)
    -      bootstrap.group(bossGroup, 
workerGroup).channel(classOf[OioServerSocketChannel])
    -    }
         def initEpoll(): Unit = {
    -      val bossGroup = new EpollEventLoopGroup(1, bossThreadFactory)
    -      val workerGroup = new EpollEventLoopGroup(0, workerThreadFactory)
    -      workerGroup.setIoRatio(conf.ioRatio)
    +      val bossGroup = new EpollEventLoopGroup(conf.serverThreads, 
threadFactory)
    +      val workerGroup = bossGroup
    --- End diff --
    
    Good point. And yes too, very likely we might separate them in the future.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to