[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] lwipopts.h setting to boost throughput
From: |
Wing Kei Chow |
Subject: |
[lwip-users] lwipopts.h setting to boost throughput |
Date: |
Wed, 3 May 2006 18:41:51 +0800 |
I am using Lwip 1.1.1 on top of tun/tap in Linux platform. To test the throughput of lwip, I made lwip as a server sending as many packets as possible to a client and client measured the data rate. I found the throughput was only 10M and wanted to raise the throughput. So I increased the value of parameter TCP_SND_BUF in
lwipopts.h to 4096 and the throughput increased up to 20Mbps. Then I further increased this parameter to larger value expecting to have higher throughput. However, when lwip receive request from the client and sent packets, lwip stopped suddenly.
In debugging, when sys_sem_signal() is executed in sent_tcp(), lwip stops. I suspect that the problem is related to pthread_cond_broadcast() which wakes up all other threads and is deadlock. Function sys_sem_signal() is in file sys_arch.c.
The code of sys_sem_signal():
void
sys_sem_signal(struct sys_sem *sem)
{
pthread_mutex_lock(&(sem->mutex));
sem->c++;
if (sem->c > 1) {
sem->c = 1;
}
pthread_cond_broadcast(&(sem->cond));
pthread_mutex_unlock(&(sem->mutex));
}
Can anybody solve this probelm?
By the way, how can I debug lwip with gdb to find where the program stopped?
Thank you very much!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] lwipopts.h setting to boost throughput,
Wing Kei Chow <=