Hi:

I am working on LWIP1.4.0 and FreeRTOSv7.1.1 to setup web server with SOCKET 
API..and found that sending speed becomes lower.
In order to know the actual sending speed, I write a simple application to test 
it. And found that the sending speed is up to 8Mb/s. it is high enough for me.
I notice that the application only setup connection one times. In web server, 
it closed connection after sending all data out. I do n't know if it may cause 
system
Performance down. I extend the sending buffer as I can. They are following:

#define TCP_MSS                 (1500 - 40)   /* TCP_MSS = (Ethernet MTU - IP 
header size - TCP header size) */

/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF             (8*TCP_MSS)

/*  TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
  as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */

#define TCP_SND_QUEUELEN        (4* TCP_SND_BUF/TCP_MSS)

/* TCP receive window. */
#define TCP_WND                 (4*TCP_MSS)

/* ---------- Pbuf options ---------- */
/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
#define PBUF_POOL_SIZE          10

/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
#define PBUF_POOL_BUFSIZE       1024

/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
   segments. */
#define MEMP_NUM_TCP_SEG        64

/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
   connections. */
#define MEMP_NUM_TCP_PCB        32

/* MEM_SIZE: the size of the heap memory. If the application will send
a lot of data that needs to be copied, this should be set high. */
#define MEM_SIZE                (12*1024)

/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
   sends a lot of data out of ROM (or other static memory), this
   should be set high. */
#define MEMP_NUM_PBUF           64

Those value is enough big for me....but why do I get better performance ?

vincent




_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to