Skip to main content

SbbObject lifecycle method fixed (this should speed up the proxy sbb)

10 replies [Last post]
fram
Offline
Joined: 2004-05-13

I made some changes to the event router, now the router is releasing an SbbObject to the pool after an event or a method is invoked during the ready state, the next SbbEntity that will use the SbbObject will find the SbbObject already initialized.
This should be really helpful for the performance issue, because the setSbbcontext method is called only once per SbbObject. If you try the proxy example, using single thread, you'll see that the setSbbContext is called only for the first registration after that the SbbEntity are using the pre-initialized SbbObject.
Leon could you try some test with this new version and let me know if there is any caps improvement.

Francesco

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mranga
Offline
Joined: 2003-06-06

Leon,

You mentioned opening some external Databases. Are you doing this during setSbbContext() ? If so then this is really going to help you. The pool keeps pre-initialized objects ( calls create, postcreate and setSbbContext ) before the event is processed and re-uses it. Previously, we were not using the pool at all. This was the likely cause of your poor performance results.

Kudos to Francesco for excellent work.

Ranga

leondo
Offline
Joined: 2005-01-18

Francesco and Ranga,

I didn't use DB inside the setSbbContext. I will certainly try your new improvements again but the only problem is that I am still having the synchronization issues which prevent me to run more than 10-20 sip calls with Sipp. I did resolve 1 or 2 problems but it does still exist.

thanks for your efforts.

Leon Do

fram
Offline
Joined: 2004-05-13

Can you please post the detail of the sipp test that you are trying to run, so that I can take a look at it and try to fix the problem.
Thanks,
Francesco

fram
Offline
Joined: 2004-05-13

I tried a sipp uac uas scenario and I can achieve 2/3 cps (the max is 3.3 cps) with the single thread router (1CPU), but after a while the cps goes down to 1,6. I think that we are leeking memory and Sbb Entities.

The proxy is on 129.6.50.114:5060.
I tried the uac and uas scenario using the following command line configuration:
sipp -sn uac -nr -r 10 -rp 1000 -d 0 -l 5 -p 5170 -trace_msg -i 127.0.0.1 -rsa 129.6.50.114:5060 127.0.0.1:5160

sipp -sn uas -d 0 -p 5160 -i 127.0.0.1 -rsa 129.6.50.114:5060 -trace_msg

I'm not familiar with sipp can anyone let me know if there is something wrong with my configuration.

Thanks,
Francesco

Message was edited by: fram

profcalc
Offline
Joined: 2005-01-20

Fransesco

Looks like your command is fine. We guys use slightly different options (below). Also, instead of the default scenarios, we use a scenario file for uac and uas each. If you want I can send it to you. But since our proxy uses DB etc, can't get it past 2 cps or so. More importantly, the run blocks after sometime because of pending replies.

Chetan
cvora@lucent.com

../apps/sipp/sipp xx.xx.83.124:5070 -s chetan -i xx.xx.83.25 -p 9999 -r 1 -l 1 -sf uac_method.xml -trace_msg -trace_err
../apps/sipp/sipp xx.xx.83.124:5070 -i xx.xx.83.25 -p 6666 -sf uas_delay.xml -trace_msg -trace_err

> I tried a sipp uac uas scenario and I can achieve 2/3
> cps (the max is 3.3 cps) with the single thread
> router (1CPU), but after a while the cps goes down to
> 1,6. I think that we are leeking memory and Sbb
> Entities.
>
> The proxy is on 129.6.50.114:5060.
> I tried the uac and uas scenario using the following
> command line configuration:
> sipp -sn uac -nr -r 10 -rp 1000 -d 0 -l 5 -p 5170
> -trace_msg -i 127.0.0.1 -rsa 129.6.50.114:5060
> 127.0.0.1:5160
>
> sipp -sn uas -d 0 -p 5160 -i 127.0.0.1 -rsa
> 129.6.50.114:5060 -trace_msg
>
> I'm not familiar with sipp can anyone let me know if
> there is something wrong with my configuration.
>
> Thanks,
> Francesco
>
>
> Message was edited by: fram

profcalc
Offline
Joined: 2005-01-20

BTW, on using the -nr option, I'm getting a lot of exceptions of this nature:

12:28:22,981 ERROR [EventRouterImpl] Illegal State! Only one of sbbEntity or Sbb
Object can be specified
12:28:22,991 ERROR [SbbEntity] Cannot find sbb entity in treecache - must be using a 'stale' id
12:28:23,001 ERROR [SbbEntity] Failed to initialise sbb entity java.lang.RuntimeException: Cannot find sbb entity in treecache - must be using a 'stale' id
at org.mobicents.slee.runtime.SbbEntity.loadFromCache(SbbEntity.java:422
)
at org.mobicents.slee.runtime.SbbEntity.(SbbEntity.java:353)
at org.mobicents.slee.runtime.SbbEntityFactory.getSbbEntity(SbbEntityFac
tory.java:178)
at org.mobicents.slee.runtime.EventRouterImpl.routeTheEvent(EventRouterI
mpl.java:979)
at org.mobicents.slee.runtime.EventRouterImpl.access$1(EventRouterImpl.j
ava:812)

Also, the Cachemap merging issue that Ranga mentioned probably is still around.

Chetan

mranga
Offline
Joined: 2003-06-06

Hi Chetan,

Those warnings should go away. They are not correct and I will take them out.

Note that this morning Fran and I sat down and did some fixing to the memory leak problem. Still more to do here but leaks are reduced.

We also reduced to a significant degree the amount of cache hit because Fran had the insight to put the Delivered Set into a global hashmap. Each time an event is delivered, that set was getting updated and the cache was being hit.

Finally we went back to Serializable consistency only for the Service structures.

Note that the latest autotest run shows we are still tck compliant in multi threaded mode. To get an idea of performance improvements run the

tests/events/convergencename/ConvergenceNameTest-StickyConvergenceNames.xml

and you can get an idea of the rate at which events are being delivered. Not very scientific I know but some measurements are forthcoming after more tuning.

The clash on the CachableMap should also be gone but please check if you can.

If you have the time to test out the latest commit, that might be useful. Please change the logging level on log4.xml to a high enough level ( say WARN or ERROR ) to get a reasonable indication of improvement.

Thanks for participating and helping us get this to a reasonable shape. We want to get this platform in as good a shape as possible with your help so as to produce some good quality research results on what we are doing.

Ranga

profcalc
Offline
Joined: 2005-01-20

Thanks, folks. We will try out the latest load.

Regding the Cachemap issue, I realized that I still had the old version when I ran the above test. So it might have been fixed. Leon also found something in the RA which might cause the CacheMap to grow for a diffrent reason so he's looking into it.

Chetan

mranga
Offline
Joined: 2003-06-06

As usual, a few more performance tweaks are committed. The profile tests seem to have a race condition. I posted a challenge to opencloud. If you have not done so, I suggest grabbing the current cvs version. If not, please post what you found.

Multi threading seems to work reliably at this point.

Ranga

leondo
Offline
Joined: 2005-01-18

Ranga and Francesco,

I am still getting the rolling error messages since yesterday build. Does anybody have any updates on this?

vityEndEvent#javax.slee#1.0], #0:) ... 6 more

2005-08-03 14:49:01,824 342760 ERROR [org.mobicents.slee.runtime.EventRouterImpl] (7729940bcba5c985:704baa:1057da7969d:-7fb4,EventTypeID[javax.slee.ActivityEndEvent#javax.slee#1.0], #0:) Caught RuntimeException in invoking SLEE originated invocation

java.lang.RuntimeException: Failed to initialise sbb entity

at org.mobicents.slee.runtime.SbbEntity.(SbbEntity.java:364)

at org.mobicents.slee.runtime.SbbEntityFactory.getSbbEntity(SbbEntityFactory.java:178)

at org.mobicents.slee.runtime.EventRouterImpl.routeTheEvent(EventRouterImpl.java:979)

at org.mobicents.slee.runtime.EventRouterImpl.access$1(EventRouterImpl.java:811)

at org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:153)

at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:88)

at java.lang.Thread.run(Thread.java:534)

Caused by: java.lang.RuntimeException: Cannot find sbb entity in treecache - must be using a 'stale' id

at org.mobicents.slee.runtime.SbbEntity.loadFromCache(SbbEntity.java:422)

at org.mobicents.slee.runtime.SbbEntity.(SbbEntity.java:353)

... 6 more

2005-08-03 14:49:01,824 342760 DEBUG [org.mobicents.slee.runtime.EventRouterImpl] (7729940bcba5c985:704baa:1057da7969d:-7fb4,EventTypeID[javax.slee.ActivityEndEvent#javax.slee#1.0], #0:) InvokeSbbRolledBack?:true

2005-08-03 14:49:01,824 342760 ERROR [org.mobicents.slee.runtime.EventRouterImpl] (7729940bcba5c985:704baa:1057da7969d:-7fb4,EventTypeID[javax.slee.ActivityEndEvent#javax.slee#1.0], #0:) Illegal State! Only one of sbbEntity or SbbObject can be specified

thanks

Leon Do