R
Ravi Ambros Wallau
Hi:
My company has developed an application that, in a very basic
explanation, send files throught a socket to a known server, using a
protocol that is implemented in a full assynchronous manner.
Saying full assynchronous means that file I/O is assyncronous (using the
method BeginRead, from the class System.IO.Stream), as well as network I/O
(using the methods exposed in the class System.Net.Sockets.Socket, that are
BeginRead, EndRead, BeginReceive, and EndReceive).
In a normal behavior, there are no more than 30 threads owned by this
application. I can have 3 threads ready, 2 or 3 threads running, and 20~23
waiting (will be expurged if not used again in a minute, a .Net defined
interval, as it seems to me).
But, sometimes, the number of threads increases up to 1000, or 1500
threads in our production servers. By monitoring the number of available
threads in the "normal" behavior, I can note that the number of free workes
threads never is lower than ~47, and the number of completion port threads
is never lower than ~997 threads. This is the normal behavior, and I don't
have the production data. But, as I understand, the total number of threads
in the application can only increase to 1000, or 1500, if many threads are
in use by the application, but are not worker threads (allocated to the
completion port).
I'll try to collect more that about this situation in the production
environment, but it's a very strange behavior. Is there some bug that makes
some I/O operation to be blocked for a long time? Is there some problem with
the environment being used (Windows 2000 Server, Windows XP)? If the link to
the remote server is slow, will I/O operations take long to complete?
Show me the light, I'm a little bit lost.
Thanks,
Ravi Wallau.
My company has developed an application that, in a very basic
explanation, send files throught a socket to a known server, using a
protocol that is implemented in a full assynchronous manner.
Saying full assynchronous means that file I/O is assyncronous (using the
method BeginRead, from the class System.IO.Stream), as well as network I/O
(using the methods exposed in the class System.Net.Sockets.Socket, that are
BeginRead, EndRead, BeginReceive, and EndReceive).
In a normal behavior, there are no more than 30 threads owned by this
application. I can have 3 threads ready, 2 or 3 threads running, and 20~23
waiting (will be expurged if not used again in a minute, a .Net defined
interval, as it seems to me).
But, sometimes, the number of threads increases up to 1000, or 1500
threads in our production servers. By monitoring the number of available
threads in the "normal" behavior, I can note that the number of free workes
threads never is lower than ~47, and the number of completion port threads
is never lower than ~997 threads. This is the normal behavior, and I don't
have the production data. But, as I understand, the total number of threads
in the application can only increase to 1000, or 1500, if many threads are
in use by the application, but are not worker threads (allocated to the
completion port).
I'll try to collect more that about this situation in the production
environment, but it's a very strange behavior. Is there some bug that makes
some I/O operation to be blocked for a long time? Is there some problem with
the environment being used (Windows 2000 Server, Windows XP)? If the link to
the remote server is slow, will I/O operations take long to complete?
Show me the light, I'm a little bit lost.
Thanks,
Ravi Wallau.