Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1465 closed enhancement (fixed)

Decrease TCP/TLS idle time interval to improve battery (thank you Johan Lantz for the report)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.14
Component: pjsip Version: common
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

The PJSIP_TRANSPORT_IDLE_TIME controls the interval before TCP or TLS transport is destroyed after nobody is using it. The default setting was 600s or 10 minutes.

With the automatic switching to TCP when packet size is larger than 1300 bytes feature, it was reported that decreasing PJSIP_TRANSPORT_IDLE_TIME to 10s improves the battery consumption considerably.

This ticket lowers the default setting to 30s 33s.

Change History (6)

comment:1 Changed 10 years ago by bennylp

  • Type changed from defect to enhancement

comment:2 Changed 10 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

(In [3976]) Lower the default TCP/TLS idle time from 600s to 30s to improve battery consumption (fixed #1465)

comment:3 Changed 10 years ago by bennylp

(In [4032]) More re #1465: introduce separate idle timeout setting for server side TCP/TLS connection and set the default to 600 seconds

comment:4 Changed 10 years ago by bennylp

(In [4091]) More re #1465: Set the default idle time to 33 from 30. With 30, some pjsip unit tests fail because the TCP transport is closed prematurely before the test completes. This should not happen in the real life as long as app uses a client transaction to send a request. The unit test uses stateless send which does not add ref_count to the transport, that is why the transport is closed prepaturely before 32 seconds (the transaction timeout interval)

comment:5 Changed 10 years ago by bennylp

  • Description modified (diff)

comment:6 Changed 10 years ago by bennylp

(In [4092]) Indirectly related to re #1465: acquire transport reference when invoking transport send(), to prevent transport from being destroyed accidently while sending is in progress, and also to reset the idle timer

Note: See TracTickets for help on using tickets.