39972: Factors affecting MassTransit performance

use Google Translate

Applies to: 

Last update: 06-04-2016


This article describes factors that affect MassTransit performance, including CPU utilization, effects of compression on performance and TCP/IP network performance.


MassTransit CPU Utilization
MassTransit is designed to transfer files as quickly as possible. As such, when connections are actively transferring files you should expect to see the computer's CPU utilization spike towards 100% [e.g. in the Windows Task Manager window]. This is completely normal and is to be expected as MassTransit is doing disk I/O, file compression, database access, and network I/O in order to pump data through the network as fast as possible. If other applications are also running on the same computer MassTransit assumes that the operating system will do its job and distribute CPU cycles to all processes.

MassTransit may also appear to be taking CPU cycles when no connections are active. MassTransit constantly polls mailboxes to see if new files have been added. It will take all available processor time to do this as quickly as it can. On a slower machine or on a fast machine with other CPU tasks, the polling will be slower. If another process requires the CPU, MassTransit will not take as much of it since the polling is done only when MassTransit is given idle time. In the lab here at GLI, we have 400MHz G3s that run MassTransit well under light to moderate load (approximately 25 contacts and 2-3 simultaneous connections with a total of 50 MB/s throughput).

This polling behavior will be improved in the next generation of MassTransit.

MassTransit on multiple CPU computers
While MassTransit is a threaded application, its use of multiple CPUs is limited as of this writing. As such, additional CPUs will not result in large performance gains although performance will not be lower than that of a single CPU. This will be addressed in a future version of MassTransit.

Effects of Improved Hardware on MassTransit performance
The speed of the CPU affects the performance of MassTransit especially when there are a large number of simultaneous connections. In this situation, the CPU spends considerable time compressing and decompressing data. A faster CPU will make these operations faster thus increasing performance.

The amount of RAM installed does not directly affect MassTransit performance. However, each active connection consumes RAM. Therefore, to support a large number of simultaneous connections sufficient RAM must be installed. If physical RAM is exhausted then the operating system will swap data to disk, which will cause MassTransit's performance to drop.

Effects of Compression on MassTransit performance
MassTransit's default setting is to compress files as they are transferred. Under normal circumstances, this results in greatly increased throughput. The size of the increase depends heavily on the types of files being transferred and how much they can be compressed. Files that are already compressed, e.g. JPEG files, reduce the throughput gains that can be had with compression. MassTransit constantly monitors how much a particular file is being compressed while it is being transferred. If compression does not result in significantly less data being transferred, MassTransit disables compression for that file. Thus, a ZIP, StuffIt, or other uncompressible file will transfer in the same amount of time regardless of whether compression is enabled.

In some circumstances, however, compression may actually reduce throughput. On high bandwidth networks, it may take more time to compress the data, send the compressed data, and decompress the data than it does to just send the uncompressed data. If this is the case, you should disable compression by unchecking the Compress Files During Transfer checkbox on the Security tab of the Edit Contact dialog box. Several variables determine whether compression should be disabled and include the bandwidth of the connection between sender and receiver and compressibility of the files being transferred.

High Bandwidth, High Latency Connections
The TCP/IP stacks shipped with current operating systems are configured to provide good throughput in specific network conditions, e.g. high bandwidth, low latency networks such as LANs. However, these default settings are not optimal for DSL, cable modems, and other high bandwidth, high latency wide area networks. For these networks, the TCP/IP configuration may need to be adjusted to get optimal performance.

The related knowledgebase article linked below provides more information about tuning MassTransit TCP/IP performance.