summaryrefslogtreecommitdiff
path: root/pjsip/src
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-03-01 23:36:30 +0000
committerBenny Prijono <bennylp@teluu.com>2006-03-01 23:36:30 +0000
commit340a886fac1ba474169031fe6d22707af8f5849f (patch)
tree96e98f248de684e1fe33f24f6525f56739aef65a /pjsip/src
parentde889cba73f719e31608b452647433e09e696150 (diff)
Increase UDP transport socket buffer size to 24M!
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@261 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r--pjsip/src/pjsip/sip_transport_udp.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/pjsip/src/pjsip/sip_transport_udp.c b/pjsip/src/pjsip/sip_transport_udp.c
index ec6c6353..8ab38edf 100644
--- a/pjsip/src/pjsip/sip_transport_udp.c
+++ b/pjsip/src/pjsip/sip_transport_udp.c
@@ -32,15 +32,28 @@
#define THIS_FILE "sip_transport_udp.c"
/**
- * These are the values for socket send and receive buffer sizes,
+ * These are the target values for socket send and receive buffer sizes,
* respectively. They will be applied to UDP socket with setsockopt().
+ * When transport failed to set these size, it will decrease it until
+ * sufficiently large number has been successfully set.
+ *
+ * The buffer size is important, especially in WinXP/2000 machines.
+ * Basicly the lower the size, the more packets will be lost (dropped?)
+ * when we're sending (receiving?) packets in large volumes.
+ *
+ * The figure here is taken based on my experiment on WinXP/2000 machine,
+ * and with this value, the rate of dropped packet is about 8% when
+ * sending 1800 requests simultaneously (percentage taken as average
+ * after 50K requests or so).
+ *
+ * More experiments are needed probably.
*/
#ifndef PJSIP_UDP_SO_SNDBUF_SIZE
-# define PJSIP_UDP_SO_SNDBUF_SIZE (4*1024*1024)
+# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024)
#endif
#ifndef PJSIP_UDP_SO_RCVBUF_SIZE
-# define PJSIP_UDP_SO_RCVBUF_SIZE (4*1024*1024)
+# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024)
#endif