Changeset 261


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

Increase UDP transport socket buffer size to 24M!

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/build/pjsip_simple.dsp

    r198 r261  
    4242# PROP Target_Dir "" 
    4343# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c 
    44 # ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c 
     44# ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c 
    4545# ADD BASE RSC /l 0x409 /d "NDEBUG" 
    4646# ADD RSC /l 0x409 /d "NDEBUG" 
     
    6565# PROP Target_Dir "" 
    6666# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c 
    67 # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c 
     67# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c 
    6868# ADD BASE RSC /l 0x409 /d "_DEBUG" 
    6969# ADD RSC /l 0x409 /d "_DEBUG" 
  • 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.