You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ted Ross (JIRA)" <ji...@apache.org> on 2018/03/01 15:03:00 UTC

[jira] [Commented] (DISPATCH-935) Configuring the dispatch with lots of addresses and autolinks cause a long startup time

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

Ted Ross commented on DISPATCH-935:
-----------------------------------

Whereas I'm sure we can make the configuration-file-processing operation more efficient, I claim that this scenario is a bit of an anti-pattern.  If you need to maintain thousands of addresses and autolinks, it's likely that the set will be changing frequently.  A better approach would be to use the management protocol to maintain the configuration.  In this case, the router operates normally while the configuration is built up and modified over time.

 

> Configuring the dispatch with lots of addresses and autolinks cause a long startup time
> ---------------------------------------------------------------------------------------
>
>                 Key: DISPATCH-935
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-935
>             Project: Qpid Dispatch
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Ulf Lilleengen
>            Priority: Major
>
> I made a simple script to generate a router config with a lot of addresses:
> {code:java}
> #!/bin/bash
> cat<<EOF > router.conf
> router {
>   mode: standalone
>   id: Router.A
>   defaultDistribution: balanced
> }
> listener {
>   name: main
>   host: 127.0.0.1
>   port: 5672
>   authenticatePeer: no
> }
> EOF
> for i in `seq 1 5000`
> do
> echo "address {" >> router.conf
> echo " prefix: addr$i" >> router.conf
> echo " waypoint: true" >> router.conf
> echo "}" >> router.conf
> echo "" >> router.conf
>  echo "autoLink {" >> router.conf
>  echo " addr: addr$i" >> router.conf
>  echo " name: linkIn$i" >> router.conf
>  echo " dir: in" >> router.conf
>  echo "}" >> router.conf
>  echo "" >> router.conf
>  echo "autoLink {" >> router.conf
>  echo " addr: addr$i" >> router.conf
>  echo " name: linkOut$i" >> router.conf
>  echo " dir: out" >> router.conf
>  echo "}" >> router.conf
>  echo "" >> router.conf
> done
> {code}
>  
> Although configuring 5000  addresses statically might not be a normal use case, it seems to cause the router to spend "forever" reading config and initializing.
>  
> Doing a pstack reveals a lot of time spent in reading config:
> {code:java}
> #0 0x00007fd2ef8cdbf9 in lookdict_string () from /lib64/libpython2.7.so.1.0
> 2018-03-01 13:23:21.379050 +0100 ROUTER_CORE (info) Router Core thread exited │#1 0x00007fd2ef968a26 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
> │#2 0x00007fd2ef969df9 in PyEval_EvalFrameEx (){code}
>  
> And
> {code:java}
> #0 0x00007fd2ef8cdbf9 in lookdict_string () from /lib64/libpython2.7.so.1.0 #1 0x00007fd2ef968a26 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0 #2 0x00007fd2ef969df9 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0 #3 0x00007fd2ef969df9 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0{code}
>  
> And
> {code:java}
> #0 0x00007ff5cbd0184e in PyObject_RichCompare () from /lib64/libpython2.7.so.1.0 #1 0x00007ff5cbd017ef in PyObject_RichCompareBool () from /lib64/libpython2.7.so.1.0 #2 0x00007ff5cbd13784 in tuplecontains () from /lib64/libpython2.7.so.1.0 #3 0x00007ff5cbd99cba in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0 #4 0x00007ff5cbd98df9 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0 #5 0x00007ff5cbd98df9 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org