In Progress CPANEL-43121 - File downloads from cPanel's File Manager are weirdly slow

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
For reasons unknown, downloading files from cPanel's File Manager is weirdly slow, or highly variable in download speed, like they're being throttled.

I've proved this across a number of servers, running different OS's and cPanel versions, and also with a 3rd party systems administrator.

To test this for yourself, upload a large file (suggest > 500Mb) to a public_html folder, and test by downloading this file directly from the website, e.g. www.domain.com/largefile.txt

Then login to cPanel for this account, navigate to File Manager, find the file in the public_html directory, and click 'download'.

Big difference, right?

If this is NOT your experience, I'd like to know!
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! cPanel doesn't impose any type of ratelimiting on the system in any area, so it's definitely odd that you're seeing this. Unfortunately I don't have a good explanation. They do use different protocols, so I'm not surprised it's different, but it shouldn't be vastly different. How different were the speeds you were seeing?
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
1Gb file download speed test

Radically different.

If you don't mind downloading a 45MB video file, click on the above link.

Up to 1m8secs that's me downloading a file called "1GB (1).test" via the web browser from File Manager - mostly super slow, up and down occasionally.

Then you'll also see the identical file being downloaded as "1GB (2).test" direct from the website (LiteSpeed). Massively faster.

Even when "1GB (2).test" finishes downloading, it doesn't help to speed up the download of "1GB (1).test"

I'm very keen to get to the bottom of this :)
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
Same issue, regardless of file size being downloaded.

fyi: I created a full cPanel backup of an account today, size: 160Mb.

Downloading it from the web interface took about 5 minutes

Via ftp took 19 seconds.

Advice from cPanel support is to disable "net.ipv4.tcp_tw_reuse" - https://support.cpanel.net/hc/en-us...3-How-to-modify-sysctl-settings?source=search

We've tried the above, but it made no difference. Except that we didn't reboot the server after making the change, so will try that and report back.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
I don't think that sysctl change would be related at all.

My thoughts on this are that the cPanel interface uses a customized PHP system to deliver the content. As in, you can completely kill Apache and PHP on the server, and the cPanel and WHM interfaces still continue to function. It wouldn't surprise me at all if your system is hitting the cPanel memory limit, or that we read the files much more slowly to conserve RAM. This would be especially apparent with larger files such as the ones you're working with, but with more "normal" files that are a few megs or less, users will likely not notice.

You could try increasing the RAM allocated to cPanel in WHM >> Tweak Settings under the PHP section and see if that offers an improvement.
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
Sincerely thanks for that.

The VPS has plenty of spare resources:

- RAM 32Gb, rarely uses more than 16Gb
- 8 x vCPU, rarely uses more than 50%
- Disk space, 525Gb used out of 700Gb

Load averages are typically 2-3.

Max cPanel process memory has been increased in Tweak Settings from 4096 (default) to 8192.
Max cPanel/WHM/Webmail service handlers has been increased in Tweak Settings from 200 (default) to 1,000.

Still no improvement :-/

The truth (solution) is out there - somewhere!
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
I wish we could find a resolution to issue issue!

I've just downloaded a backup from JetBackup 5 (same protocol as cPanel backups, no doubt), and it's taken about 30 mins to download a small 365Mb file.

In all other respects, this is from a high performing, high specification server running the latest OS,cPanel, and at a time when there's low load on the server.
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
Is it possible to escalate this issue? It's seriously negatively affecting the satisfaction of our customers when they're attempting to download backups.

Hopefully the reason is just one thing. It just requires some focused diagnostic/troubleshooting effort by a suitably skilled tech.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
@spaceman - we already know the reason, so no additional diagnosing or troubleshooting is necessary. It's just up to a development team to take on the work to fix the issue.

I've been hearing off and on for *years* that we'll be getting rid of FTP. Well, it hasn't happened yet, but I do think it will someday. So I think this case will definitely get fixed. What I can't say is when the case will get resolved, as I don't see that a specific internal team has picked it up just yet.
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
OK, great to know that you know the reason.

I sincerely hope it's not a complex or controversial fix.

Downloading (large) backup files at a typical speed of <10 kb/s is NOT fun!

Sure, on occasions during a download the transfer speed temporarily bounces up to 2-10Mb/s (where it should be all the time!), but then for no apparent reason falls back to <10kb/s.

Aaaargh!!!
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
Call me old-fashioned, but IMHO this is a high-impact issue, with probably/hopefully a relatively simple fix, and therefore deserves to be towards the top of the queue.