ThingWorx Edge C SDK > Best Practices > Best Practices for Transferring Large Files
Best Practices for Transferring Large Files
When transferring large files, follow these best practices to ensure optimal performance:
1. Set the blockSize parameter to 1MB (1,024,000 bytes) for maximum bit rate on average. The proper setting of this parameter is essential to improving file transfer performance.
2. File transfer times depend on Internet bandwidth, which varies and increases in load at certain times of the day. Choose a time of day when network traffic is low to transfer large files from edge devices to a ThingWorx Platform. When possible, improve the quality of your network. Testing has shown that results vary by time of day and the network being used. When network performance degrades, the performance of large file transfers can be negatively affected very quickly.
3. Removing any socket read timeouts also increases performance. By default the DEFAULT_SOCKET_READ_TIMEOUT in twDefaults.h is set to zero (0). For best performance, keep this default setting.
4. Make sure that the logLevel is not set to TRACE. A level of INFO is recommended.
5. Set up the File Transfer Subsystem (FTSS) on your ThingWorx Platform as shown in the following figure. These settings have been tested and shown to be optimal when transferring large files:
The lower of the two block size values, namely for the C SDK and the FTSS of the ThingWorx Platform, is used at run time. The platform is hard-coded with a maximum block size of 1MB. To be safe, set both the FTSS and C SDK block sizes to 1MB. The platform FTSS configuration table currently defaults to 128,000.
Was this helpful?