Kaseya Community

Slow transfer speeds using the WriteFile step

This question is not answered

I have noticed recently that the transfer speed of the writeFile agent procedure step is not as fast as I think it should be.  I have a 100mb+ link between my VSA and any of the effected endpoints and none of the endpoints are pegged for disk or CPU.  I have also checked diskIO, CPU and mem on the VSA and everything is healthy. Despite this, the writeFile transfer speed is sometimes as low as 3kbps.  This has been an intermittent issue since 6.3, but it comes and goes so I have not taken the time to dig into it.

I am curious about a couple things.

  • Does anyone else experience similar bottlenecks?  
  • Under the hood, how does that step work? Is it HTTP, FTP, something else?
  • Is writeFile the best option to get files from the VSA to endpoints?  I have been considering creating a public S3 bucket to hold some of the non-sensitive files I need to transfer, then getting them with the getURL() step

I am not adverse to opening a support ticket on this issue, I was just hoping to go into it with a bit more knowledge beforehand.

All Replies
  • Under agent -> check in control what is your bandwidth throttle set at (I'm actually not certain if this applies to procedure file transfers, but it might)

  • Thanks for the quick feedback.  I checked the Check-In Control and it is set to disabled for all of my endpoints.

  • I believe this is also affecting the speed at which agents get packages from the KSDU module on the VSA.  I was watching an endpoint download an update and it was only coming in at 90kbps, despite having a 400mb+ pipe between the VSA and the endpoint.

  • Andrew,

    Did you ever come up with a fix for this? I'm having the same issue on my end. Pushing files with WriteFile() is very slow, while download the same file from the same server via HTTP is blazing fast.

  • No, I never came up with a real fix.  However, I did just double the disk IO and memory in my kserver a few days ago, so I should revisit this to see if it's any better.

  • I put a ticket into Kaseya about 8 hours and it hasn't even been assigned to a support agent yet (surprise). However, in the interim, I've tested using cURL to download the file over HTTP, then checking the MD5, and it's DRAMATICALLY faster that way.

  • I opened a ticket at well, and the proposed solution was LanCache.  Not my favorite answer but I figured I would give it a shot.  We struggled with it for a while but I just can't get it to work.  Since LanCache won't really solve my problems (many people aren't in an office) I've all but abandoned the ticket.

  • I have a few thousand machines in disparate locations with no LAN, so that won't work for me either.

  • The original WriteFile function has been around since before 6.x.

    To my knowledge this function has never really been an efficient way to transfer data files, especially large data files, and has not been re-worked at all since.

    For small files I normally use the writeFile. I usually have cUrl as a Distributed File so when I need to call on it, they will be available on every managed machine. Kaseya uses a custom version of cUrl FYI.

  • Hi all,

    So writefile() has always been slow. It must be by design.

    On Lancache, we use it extensive across 10000+ agents country wide, to different organisations.

    It is not dependant on a LAN or WAN, all it needs is disk space on a machine at a site. We use machine groups per site per organisation and we have a Lancache per machine group.

    What is does is the following:

    Writefile() copies (slowly) the file to the agent the procedure is executed on.

    Once the file is copied, it is automatically copied to the assigned LanCache.

    Then any further machines that the procedure is executed on, the writefile() gets the file from the LanCache instead of the Kaseya server.

  • One addition is to use WriteDirectory().

    Which writes a directory from the Shared files on the Kaseya server to the agent, then onto the LanCache.

  • I think Kaseya throttled WriteFile because of the burden it put on the KServer many releases ago  This became evident on their SaaS computers.   A few big downloads would kill the performance.

    The simple solution is to host these files elsewhere, and use the GETURL command to download them where you want them to go, or use LanCache.