Skip to main content
12-Amethyst
March 5, 2026
Question

Is there a way to speed up wsems for small files?

  • March 5, 2026
  • 2 replies
  • 145 views

Hey All,

 

I am running in to a bottle neck of the amount of files we want to want to send over the wsems server.

thingworx 9.7.0

wsems 5.5.0

 

Wsems config:

{
 "ws_servers": [{
 "host": "*ip of host*",
 "port": portnumber
 }],
 "ws_connection": {
				"socket_read_timeout": 1, <!-- tried with and without this line, no noticeable impact-->
 "encryption": "ssl",
 "verbose": true <!-- false seems to have a small positive impact-->
 },
 "certificates": {
 "validate": false,
				"disable_hostname_validation": true,<!-- i know this is bad, but we use wildcard certificates... https://www.ptc.com/en/support/article/CS389668 -->
 "allow_self_signed": true,
				"cert_chain": ""
 },
 "appKey": "*appKey*",
 "auto_bind": [{
 "name": "*name*",
 "gateway": false
 }],
 "http_server": {
 "host": "localhost",
 "port": *port*,
 "content_read_timeout": 2000,
 "ssl": true,
 "authenticate": false,
 "certificate": "*certificate*",
 "private_key": "*private_key*",
 "passphrase": "*passphrase*"
 },
 "file": {
 "buffer_size": 8192,<!--tried to change the buffer size to 128000, does not seem to have an affect-->
 "max_file_size": 8000000000,
 "virtual_dirs": [{
 "ToThingworx": "*filepath*/Inbox"
 }, {
 "staging": "*filepath*/staging"
 }],
 "staging_dir": "staging"
 },
 "logger": {
 "level": "ERROR",
 "max_file_storage": 2000000,
 "auto_flush": true
 },
 "data_security": {
 "key_hash": "*key_hash*"
 }
}

 

Here is a sample of the logs:

*****************
FILE TRANSFER NOTIFICATION:
Source: source:/ToThingworx/serialnr/2026-03-03_08-51-25-440_STAT.data/2025-03-27_08-51-25-440_STAT.data
Destination: TelematicsRepository:/ToThingworx/serialnr/2026-03-03_08-51-25-440_STAT.data/2025-03-27_08-51-25-440_STAT.data
Size: 117
StartTime: 2026-03-03 15:12:36,185
EndTime: 2026-03-03 15:12:36,423
Duration: 238 msec
User: Administrator
State: VALIDATED
Message: Transfer complete
Transfer ID: fe878f06-7164-4fad-a90c-7ec570ee80cf
*****************

[FORCE] 2026-03-03 15:12:36,567 SDK: FILE TRANSFER STARTED. File: /opt/ListenerDev/Data/Inbox/serialnr/2026-03-03_08-53-19-845_JOB.data, Mode: read
[FORCE] 2026-03-03 15:12:36,839 SDK: twFileManager_FinishFileTransfer: VALIDATED. File: /ToThingworx/serialnr/2026-03-03_08-53-19-845_JOB.data
[AUDIT] 2026-03-03 13:12:36,839 :

*****************
FILE TRANSFER NOTIFICATION:
Source: source:/ToThingworx/serialnr/2026-03-03_08-53-19-845_JOB.data/2026-03-03_08-53-19-845_JOB.data
Destination: TelematicsRepository:/ToThingworx/serialnr/2026-03-03_08-53-19-845_JOB.data/2026-03-03_08-53-19-845_JOB.data
Size: 975
StartTime: 2026-03-03 15:12:36,562
EndTime: 2026-03-03 15:12:36,836
Duration: 274 msec
User: Administrator
State: VALIDATED
Message: Transfer complete
Transfer ID: 915c40bb-3448-4ea5-9f34-aeb5fecabdcb
*****************

 

Thingworx and wsems are hosted in the same datacenter, when i ping between the servers there is a response around 1 ms.

 

Is there a way to reduce the time it takes to complete a file transfers for small files?

2 replies

Community Manager
March 11, 2026

Hi @JU_10321794 

 

Here are some things to check / try:

 

Buffer Size Adjustment: You mentioned that changing the buffer size to 128000 did not yield noticeable improvements. However, experimenting with different buffer sizes (both increasing and decreasing) may still be worthwhile, as optimal settings can vary based on the specific environment and file sizes.

 

Connection Settings: The socket_read_timeout is currently set to 1 second. While you noted no significant impact from this setting, consider testing different timeout values to see if they affect transfer speeds. Additionally, setting verbose to false has shown a slight positive impact, so maintaining this setting could help.

 

File Size and Transfer Mode: Since you are transferring small files, ensure that the max_file_size is appropriately set, which you have at 8000000000 (8 GB). This should not be a limiting factor for small files, but ensure that the file transfer mode is optimized for smaller files.

 

Network Configuration: Since both ThingWorx and WSEMS are hosted in the same data center with a low ping time, network latency is likely not the issue. However, ensure that there are no other network configurations or firewalls that could be affecting transfer speeds.

 

Logging Level: The logging level is set to "ERROR," which is good for performance. If you need more insights, consider temporarily increasing the logging level to capture more details about the transfer process, but revert it back to "ERROR" to avoid performance degradation.

 

File Transfer Notifications: Review the logs for any patterns or delays that could indicate where the bottleneck occurs. The logs you provided show that transfers complete in a few hundred milliseconds, which is reasonable for small files, but if you notice consistent delays, further investigation may be needed.

 

Consult Documentation: Refer to the following resources for additional insights and best practices that may help optimize your file transfer process:

 

Hope this information is helpful.

 

Regards.

 

--Sharon

Community Manager
March 19, 2026

Hi @JU_10321794 

 

If my previous response was helpful, please mark it as the Accepted Solution for the benefit of others in the community.  If you see have questions, please let us know.

 

Regards.

 

--Sharon