-
Notifications
You must be signed in to change notification settings - Fork 357
Async submit taking more time even when window is not full #82
Comments
Can you log the window stat before AND after the sendRequestPdu call? Is this against a real SMSC or a simulator? On Thu, Feb 26, 2015 at 3:09 AM, abin-mathew [email protected]
|
This is a real SMSC. We have asked them to not submit messages to operator until we are done with load testing. Will the SMSC response time affect the time taken by async submit? I have added the following to print window stats before and after submit : log.info("Window data before submit. max size : "+window.getMaxSize()+", size : "+window.getSize()+", free : "+window.getFreeSize()+", pending : "+window.getPendingOfferCount()+", session : "+zdSession.getName()); The logs printed were : 11:15:18.160[ INFO][taskExecutor-58] [smpp] [ZdAsyncMessageSender.java:101] - Window data before submit. max size : 50, size : 1, free : 49, pending : 0, session : Account_2000140116_29 11:15:18.255[ INFO][taskExecutor-69] [smpp] [ZdAsyncMessageSender.java:121] - Window data. max size : 50, size : 1, free : 49, pending : 0, session : Account_2000140116_27, time : 95 |
If async mode is on -- then here are reasons the method may block/take time:
I'd also suggest isolating out parts of your code to do more profiling. If you are still hitting an issue figuring this out -- and if you have the On Thu, Feb 26, 2015 at 10:14 PM, abin-mathew [email protected]
|
This is a continuation of issue #77
I have noticed that my sms service slows down under high traffic. I am using async submit, and to debug this I have added a log to print the time taken to do an async submit including window stats. From the log I can see that the time taken for async submit increases gradually from about 2 millisec to almost 400 millisecs even when the window is nowhere near full. Logs added in code is :
long start = Calendar.getInstance().getTimeInMillis();
session.sendRequestPdu(submit, 30000, false);
long end = Calendar.getInstance().getTimeInMillis();
long timeTaken = end - start;
log.info("Window data. max size : "+window.getMaxSize()+" size : "+window.getSize()+" free : "+window.getFreeSize()+" pending : "+ window.getPendingOfferCount()+" session : "+zdSession.getName()+" time : "+timeTaken);
The logs printed for a single session at three points during the execution are
12:32:30.618[DEBUG][taskExecutor-23] [smpp] [ZdAsyncMessageSender.java:97] - Window data. max size : 50 size : 1 free : 49 pending : 0 session : Account_2000140116_36 time : 24
12:32:31.649[DEBUG][taskExecutor-43] [smpp] [ZdAsyncMessageSender.java:97] - Window data. max size : 50 size : 3 free : 47 pending : 0 session : Account_2000140116_36 time : 133
12:32:33.850[DEBUG][taskExecutor-44] [smpp] [ZdAsyncMessageSender.java:97] - Window data. max size : 50 size : 3 free : 47 pending : 0 session : Account_2000140116_36 time : 461
From the log it appears that even when the window is not full the async submit time gradually increases. Under what situation can this happen? Does it by any chance depend on the SMSC speed? Is there anything else that I am missing?
The text was updated successfully, but these errors were encountered: