Tactical Software Tech Note
System Considerations for High Port Counts
Tactical redirectors support up to 4096 virtual COM ports in Windows 10, 8, 7, Vista, XP, 2012, 2008, 2003, 2003 R2 and 2000 operating systems.
Windows 9x and ME have architectural issues that prevent large numbers of COM ports from working, so these operating systems have the maximum number of virtual COM ports set at 256.
Windows NT 4.0 has half as much memory allocated to kernel-level device drivers as more recent versions of Windows. While it is technically possible to create 4096 COM ports on a Windows NT 4.0 PC, the memory pool for COM port drivers will be much smaller and the maximum port count should be kept below 2000.
An application will take more CPU cycles as it uses more COM ports, so it is important to be sure that there is enough processing power for the application to handle using all the simultaneous COM ports.
On most PCs, there is a difference between the ability to have over 4000 ports redirected, and using all the ports at once. It is not hard to max out the CPU of a fast machine with 256 concurrent ports actively passing data, so the ability to use an even larger number of ports will depend greatly on the application behavior and the speed of the host machine.
The application that is being used to open the COM ports and send data creates almost all of the stress on a system, while the overhead from Tactical redirectors is almost negligible. Therefore, if an application can use a certain number of real COM ports successfully, then the same results should be seen when using our virtual COM ports.
Unless a multi-port test is done with the same application that will be used in a real situation, it really isn't possible to tell how many CPU cycles (or how much RAM) it will use, as the specific way that an application is written will determine the resources that it uses whether idle or actively processing data. We found that some applications take quite a large amount of CPU time per each COM port used, while other programs can transfer the same data using a different protocol with no where near the same CPU usage.
A Windows machine will only be able to make 3975 active outbound TCP connections before running out of TCP port numbers. This alone prevents 4096 active COM port sessions, not even counting the fact that other programs will be making their own TCP connections.
The TCP ports used for these connections are not available for re-use until several minutes have elapsed after a connection has been closed. An application which opens and closes COM ports frequently can easily cause the operating system to run out of TCP ports.
There is a registry setting that can be changed to raise the amount of TCP ports available to Windows.
Value Name: MaxUserPort Data Type: REG_DWORD Value: Default: 0x1388 (5000 decimal, (which gives 3975 available ports)); Max: 65534(decimal)
Finding the optimum value for this registry setting will require some experimentation as it is dependent on the serial application that is used and other TCP/IP based programs on the same PC.
We recommend testing with the same COM port count as you are planning on using in your deployment to ensure that your PC has enough RAM and processor cycles to run smoothly.
Even if you have tested your application with hundreds (or thousands) of real COM ports and know that it will not be short CPU cycles or system RAM, keep in mind that the available TCP port range mentioned above must be set high enough so that Windows will not run out of useable TCP port numbers.