[UDT] UDT Resource Usage (again) + Bug in socket creation
Brought to you by:
lilyco
From: Chen X. <xd...@es...> - 2006-03-14 04:34:35
|
Hi, I also observed high CPU usage at the sending side. This occurred for both UDT 2.3 and UDT 3.0 on Windows and it happened every time. I had tried to step into UDT 3.0 while it was busy and found out the code was iterating inside the while loop in CUDT::sndHandler. Following shows the important lines in core.cpp that execution looped around. 0972: while (!self->m_bClosing) 1047: if (0 == (payload = self->m_pSndBuffer->readData(&(datapkt.m_pcData), self->m_iPayloadSize, datapkt.m_iMsgNo))) 1050: if (0 == self->m_pSndBuffer->getCurrBufSize()) 1072: self->m_ullTimeDiff = 0; 1075: continue; I compiled the UDT library using NO_BUSY_WAITING but without CUSTOM_CC. BTW, there is a bug in your UDT 3.0 code in CUDTUnited::newSocket in api.cpp. 0155: if ((type != SOCK_STREAM) || (type != SOCK_DGRAM)) 0156: throw CUDTException(5, 3, 0); "||" should be changed to "&&". This bug causes all programs to fail because a socket can never be created. Thanks & Regards, Xudong |