Re: [PATCH] - FIX - UCP/EMI Throttling MT v4.0

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Vincent,

IMO it's not good to delay acks. It would be better to just check throughput
and not send message but only ack.

Vincent CHAVANIS wrote:

> Hi andreas,
> 
> The main problem with EMI thread is that actually
> we have a sender thread awakened
> when we need to ack an incoming message.
> This patch fixes the sleeping process when it is awakened.
> While throughtput is not entirely done, it will sleep until
> (last_mt_microtime + throughput < now) It actually works with 2 differents
> of our operators.
> 
> Here is an example : (during this second we tried to send 1 msg and at the
> same time receiving 21 instructions to ACK)
> 
> 2007-03-23 18:33:26.733 [31081] [46] DEBUG: EMI2[SMS_6]: QOS:
> last_mt_microtime:<1174671205.812181> now:<1174671206.733465> delay:<1.0
> 00000> 2007-03-23 18:33:26.733 [31081] [46] DEBUG: EMI2[SMS_6]: QOS:
> Traffic Policy exceeded, we need to sleep <0.078716>sec 2007-03-23
> 18:33:26.810 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.001345>sec 2007-03-23 18:33:26.811 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000349>sec 2007-03-23 18:33:26.811 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000327>sec 2007-03-23
> 18:33:26.811 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000307>sec 2007-03-23 18:33:26.811 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000288>sec 2007-03-23 18:33:26.811 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000230>sec 2007-03-23
> 18:33:26.811 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000213>sec 2007-03-23 18:33:26.811 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000197>sec 2007-03-23 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000180>sec 2007-03-23
> 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000164>sec 2007-03-23 18:33:26.812 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000148>sec 2007-03-23 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000132>sec 2007-03-23
> 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000115>sec 2007-03-23 18:33:26.812 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000099>sec 2007-03-23 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000083>sec 2007-03-23
> 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000066>sec 2007-03-23 18:33:26.812 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000050>sec 2007-03-23 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Traffic Policy exceeded, we need to sleep <0.000034>sec 2007-03-23
> 18:33:26.812 [31081] [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy
> exceeded, we need to sleep <0.000017>sec 2007-03-23 18:33:26.812 [31081]
> [46] DEBUG: EMI2[SMS_6]: QOS: Traffic Policy exceeded, we need to sleep
> <0.000001>sec 2007-03-23 18:33:26.973 [31081] [46] DEBUG: EMI2[SMS_6]:
> QOS: Throughput detected, we need to sleep <1.000000>sec
> 
> 
> 
> 
> --
> Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
> Service Technique/Reseau - NOC
> Developpement SMS/MMS/Kiosques
> http://www.telemaque.fr/
> [email protected]
> 
>   ----- Original Message -----
>   From: Andreas Fink
>   To: Vincent CHAVANIS
>   Cc: [email protected]
>   Sent: Friday, March 23, 2007 8:24 PM
>   Subject: Re: [PATCH] - FIX - UCP/EMI Throttling MT v4.0
> 
> 
> 
> 
>   On 23.03.2007, at 17:37, Vincent CHAVANIS wrote:
> 
> 
>     Hi all
> 
> 
>     For those who are using my throttling EMI patch posted a few month ago
>     on this ML Here is an rare issue that can make the sending thread
>     waiting for lifetime.
> 
> 
>     The issue is reproductible when no MT is sent for a while so
>     'last_mt_microtime' is not initialized. We fix it at connect (UCP 60),
>     we will now initialize this variable to the current microtime.
> 
> 
>     2007-03-23 11:05:30.450 [12348] [53] DEBUG: EMI2[SMSC_8]: QOS:
>     Throughput detected, we need to sleep <1.000000>sec 2007-03-23
>     11:05:31.450 [12348] [53] DEBUG: EMI2[SMSC_8]: QOS: Sleeping Done.
>     2007-03-23 11:05:31.450 [12348] [53] DEBUG: EMI2[SMSC_8]: QOS:
>     last_mt_microtime:<3689911777816892928.000000> now:<1174644331.450592>
>     delay:<1.000000> 2007-03-23 11:05:31.450 [12348] [53] DEBUG:
>     EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642248704.000000>sec 2007-03-23 12:30:41.659 [12348] [53]
>     DEBUG: EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642243584.000000>sec 2007-03-23 12:30:52.730 [12348] [53]
>     DEBUG: EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642243584.000000>sec 2007-03-23 12:30:55.739 [12348] [53]
>     DEBUG: EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642243584.000000>sec 2007-03-23 12:30:57.244 [12348] [53]
>     DEBUG: EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642243584.000000>sec 2007-03-23 12:30:59.261 [12348] [53]
>     DEBUG: EMI2[SMSC_8]: QOS: Traffic Policy exceeded, we need to sleep
>     <3689911776642243584.000000>sec
> 
> 
>     Vincent.
> 
> 
>     --
>     Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
>     Service Technique/Reseau - NOC
>     Developpement SMS/MMS/Kiosques
>     http://www.telemaque.fr/
>     [email protected]
>     <emi_patch_ack_v4.txt>
> 
> 
> 
> 
>   Does it actually work?
>   The reason why I ask this is because you simply sleep for a certain
>   delay when the throughput has been reached. the delay however might fall
>   short if someone wakes this thread in the meantime. I use that often in
>   my code to trigger another thread telling it that there is now something
>   to send. I'm not sure if EMI driver does that however.
> 
> 
>   The effect would be not sleeping that long which is probably just
>   increasing the throughput a bit.
> 
> 
>   Andreas Fink
> 
> 
>   Fink Consulting GmbH
>   Global Networks Schweiz AG
>   BebbiCell AG
> 
> 
>   ---------------------------------------------------------------
>   Tel: +41-61-6666330 Fax: +41-61-6666331  Mobile: +41-79-2457333
>   Address: Clarastrasse 3, 4058 Basel, Switzerland
>   E-Mail:  [email protected]
>   www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
>   ---------------------------------------------------------------
>   ICQ: 8239353 MSN: [email protected] AIM: smsrelay Skype: andreasfink
>   Yahoo: finkconsulting SMS: +41792457333

-- 
Thanks,
Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.