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

    https://github.com/apache/spark/pull/11615#discussion_r55725635
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/JettyUtils.scala ---
    @@ -270,9 +270,21 @@ private[spark] object JettyUtils extends Logging {
     
           gzipHandlers.foreach(collection.addHandler)
           connectors.foreach(_.setHost(hostName))
    +      // As each Acceptor will use one thread, the number of threads 
should at least be the number
    +      // of acceptors plus 1.
    +      val minThreads =
    +        connectors.collect { case c: AbstractConnector => c 
}.map(_.getAcceptors).sum + 1
           server.setConnectors(connectors.toArray)
     
           val pool = new QueuedThreadPool
    +      var maxThreads = conf.getInt("spark.ui.threads", pool.getMaxThreads)
    --- End diff --
    
    I was worried that 1 thread for processing requests may be not enough.
    
    @srowen what do you think about `just hard-core the max number of acceptors 
to a small number`? Maybe just 8?
    
    The default configuration of Jetty seems good to a web application that 
supports massive  connections. However, Spark Web UI doesn't need to support so 
many users, so it's a waste to create many threads.


---
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