Ignore:
Timestamp:
Mar 1, 2006 11:36:30 PM (19 years ago)
Author:
bennylp
Message:

Increase UDP transport socket buffer size to 24M!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c

    r260 r261  
    3333 
    3434/** 
    35  * These are the values for socket send and receive buffer sizes, 
     35 * These are the target values for socket send and receive buffer sizes, 
    3636 * respectively. They will be applied to UDP socket with setsockopt(). 
     37 * When transport failed to set these size, it will decrease it until 
     38 * sufficiently large number has been successfully set. 
     39 * 
     40 * The buffer size is important, especially in WinXP/2000 machines. 
     41 * Basicly the lower the size, the more packets will be lost (dropped?) 
     42 * when we're sending (receiving?) packets in large volumes. 
     43 *  
     44 * The figure here is taken based on my experiment on WinXP/2000 machine, 
     45 * and with this value, the rate of dropped packet is about 8% when 
     46 * sending 1800 requests simultaneously (percentage taken as average 
     47 * after 50K requests or so). 
     48 * 
     49 * More experiments are needed probably. 
    3750 */ 
    3851#ifndef PJSIP_UDP_SO_SNDBUF_SIZE 
    39 #   define PJSIP_UDP_SO_SNDBUF_SIZE     (4*1024*1024) 
     52#   define PJSIP_UDP_SO_SNDBUF_SIZE     (24*1024*1024) 
    4053#endif 
    4154 
    4255#ifndef PJSIP_UDP_SO_RCVBUF_SIZE 
    43 #   define PJSIP_UDP_SO_RCVBUF_SIZE     (4*1024*1024) 
     56#   define PJSIP_UDP_SO_RCVBUF_SIZE     (24*1024*1024) 
    4457#endif 
    4558 
Note: See TracChangeset for help on using the changeset viewer.