Hi Roland,

Thanks for the response.  The 100 threads was just to verify that I could 
control the # threads.  I didn’t realize it was using a bounded task queue.

How do I configure a dedicated dispatcher for the operations in the flows 
that handle each connection as opposed to inheriting it from the 
FlowMaterializer?  That is what I was really trying to do.  Currently they 
seem to share the dispatcher.  It is not because I am blocking, but because 
I want to know how to control config on everything within these higher 
level constructs and not have to use the default.

Cheers,

Randy

On Thursday, January 22, 2015 at 4:08:23 AM UTC-8, rkuhn wrote:
>
> Hi Randy,
>
> without setting max-pool-size-max (which defaults to 64) you will not be 
> able to see more than 64 threads. May I ask why you want to create 100 
> threads for handling a single stream of incoming connections? I would 
> expect at least 99 of them to be idle at all times. If you want to perform 
> blocking operations in the flows that handle each of those connections then 
> I’d recommend to use a dedicated dispatcher for those.
>
> Regards,
>
> Roland
>
> 20 jan 2015 kl. 17:21 skrev Randy Fox <rand...@connexity.com <javascript:>
> >:
>
> Nope.  Did I find a bug or am i doing something wrong?
>
> On Saturday, January 17, 2015 at 1:21:12 PM UTC-8, √ wrote:
>>
>> Alright. Did you manage to sort it out?
>>
>> -- 
>> Cheers,
>> √
>> On 16 Jan 2015 16:56, "Randy Fox" <rand...@connexity.com> wrote:
>>
>>> I expected the thread pool to be pegged at 100 threads, but watching in 
>>> visual vm showed 24 threads (default).  Poking around the object structure 
>>> in the debugger, I found nested deep under the flowmaterializer was a 
>>> maxsize of 64 (also default).
>>>
>>> -r
>>>
>>> On Thursday, January 15, 2015 at 5:34:05 PM UTC-8, Randy Fox wrote:
>>>>
>>>> I am trying to assign a dispatcher to be used for my http server (using 
>>>> the new Akka HTTP Server) and can’t get it to honor my pool size settings. 
>>>>  
>>>> Logs show it is using the dispatcher, but visualvm shows it is not using 
>>>> the core pool size settings.   Loos like it might be using the defaults 
>>>> for 
>>>> a thread-pool-executor.
>>>>
>>>>
>>>> All I did was modify the example:
>>>>
>>>>    1. import akka.http.Http 
>>>>    2. import akka.stream.FlowMaterializer 
>>>>    3.   
>>>>    4. implicit val system = ActorSystem() 
>>>>    5. implicit val materializer = FlowMaterializer(
>>>>    *MaterializerSettings*(*system*).withDispatcher(
>>>>    *“myhttpRequestHandler.dispatcher"*)) 
>>>>    6.   
>>>>    7. val serverBinding = Http(system).bind(interface = "localhost", 
>>>>    port = 8080) 
>>>>    8. serverBinding.connections.foreach { connection => // foreach 
>>>>    materializes the source 
>>>>    9.   println("Accepted new connection from " + 
>>>>    connection.remoteAddress) 
>>>>    10. } 
>>>>    11. … 
>>>>
>>>> myhttpRequestHandler {
>>>>
>>>>   dispatcher {
>>>>
>>>>     type = Dispatcher
>>>>
>>>>     executor = *"thread-pool-executor"*
>>>>
>>>>     name = httprequesthandler-dispatcher
>>>>
>>>>     thread-pool-executor {
>>>>
>>>>       core-pool-size-min = 100
>>>>
>>>>       core-pool-size-factor = 2.0
>>>>
>>>>       core-pool-size-max = 100
>>>>
>>>>     }
>>>>
>>>>     throughput = 5
>>>>
>>>>   }
>>>>
>>>> }
>>>>
>>>> [INFO] [2015-01-15 17:24:27,516] [DUDE-myhttpRequestHandler.dispatcher-79] 
>>>> HttpRequestHandler(akka://DUDE): Accepted new connection from /
>>>> 127.0.0.1:54046
>>>>
>>>> What am I missing?
>>>>
>>>> Thanks,
>>>>
>>>> Randy Fox
>>>>
>>>
>>> -- 
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: 
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives: 
>>> https://groups.google.com/group/akka-user
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com <javascript:>.
> To post to this group, send email to akka...@googlegroups.com 
> <javascript:>.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> *Dr. Roland Kuhn*
> *Akka Tech Lead*
> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
> twitter: @rolandkuhn
> <http://twitter.com/#!/rolandkuhn>
>  
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to