cygwin/x symantec antivirus conflict

Philip Gladstone
Sun Oct 10 13:40:00 GMT 2004

Christopher Faylor wrote:

> <>On Wed, Oct 06, 2004 at 10:36:22PM -0400, Philip Gladstone wrote:
>>The slowness that I see with Symantec Antivirus is due to the 'select'
>>emulation in cygwin. Whenever XWin.exe does a select (which is nearly
>>all the time), the select emulation creates a new thread, creates a new
>>TCP socket and then connects to it. I suspect that the Symantec firewall
>>is getting in the picture here and making this a very slow operation.
>Cygwin should not be actually creating threads in this scenario.  It
>should be reusing thread from a thread pool.
>If there are a lot of sockets being waited on (which doesn't seem to
>be the case here) then the pool could be exhausted and new threads could
>be created.  If that was the issue then we could bump up the size of
>the thread pool.
It doesn't seem to the be the cost of creating the thread, but creating 
the socket.

A simple test program (running in a pure windows environment with 
norton) shows that it takes 8-10ms to create a socket.It only takes 30us 
to send a udp packet from one socket to another. [This is on a fairly 
old and tired machine -- 1.4GHz Athlon --, however I would expect the 
ratio to be valid]  You could argue that this is a huge problem with 
symantec, but I'm not sure that would be helpful!!!!!!!

The select emulation (as I recall) creates 2 TCP Sockets and then 
connects from one to the other. This takes around 20ms on my system -- 
thus limiting me to performing 50 selects per second.

You can find the test program (needs visual studio to build) at The zip file does contain a 
prebuilt exe if you are brave.


Philip Gladstone
* Check out the live pondcam at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3322 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the Cygwin-xfree mailing list