P
PH
Hi guys;
I got a single processor computer, running an application that launches
2 threads.
Each of these threads listens for incoming connections in a specific
port, so there is a Loop . Until inside each of them.
When a packet is received the thread calls a method that process the
packet, and so on, this happens for every packet in any of those 2
ports.
THIS SI NOT THE ACTUAL CODE, BUT IS SOMETHING ALIKE
--------------------------
Dim Thread1 as new Thread (addressOff ProcessPacket)
Thread1.Start
Dim Thread2 as new Thread (addressOff ProcessPacket)
Thread2.Start
Private Sub ProcessPacket
Do
BeginAccept( WhateverProc)
Until bStop
End Sub
Private Sub WhateverProc
Process the packet
End Sub
--------------------------
Now, my problem is that in a period of time, lets say 30 seconds, I only
receive 4 packets (this is only when I test, in production will be a LOT
more, believe me ;-) )
What happens is that the processor's resources are almost gone, and the
computer reacts responsive less.
If this is happening with 4 packets, I don't what to even imagine what
will happen with 100.
Is there any way to easy the life of the processor even with more
traffic coming in?
Thanks
I got a single processor computer, running an application that launches
2 threads.
Each of these threads listens for incoming connections in a specific
port, so there is a Loop . Until inside each of them.
When a packet is received the thread calls a method that process the
packet, and so on, this happens for every packet in any of those 2
ports.
THIS SI NOT THE ACTUAL CODE, BUT IS SOMETHING ALIKE
--------------------------
Dim Thread1 as new Thread (addressOff ProcessPacket)
Thread1.Start
Dim Thread2 as new Thread (addressOff ProcessPacket)
Thread2.Start
Private Sub ProcessPacket
Do
BeginAccept( WhateverProc)
Until bStop
End Sub
Private Sub WhateverProc
Process the packet
End Sub
--------------------------
Now, my problem is that in a period of time, lets say 30 seconds, I only
receive 4 packets (this is only when I test, in production will be a LOT
more, believe me ;-) )
What happens is that the processor's resources are almost gone, and the
computer reacts responsive less.
If this is happening with 4 packets, I don't what to even imagine what
will happen with 100.
Is there any way to easy the life of the processor even with more
traffic coming in?
Thanks