Knowledge Base

Knowledge Base / XFilesharing Pro / Performance tuning

Performance: 'dl.cgi' (non-direct) links causes high server-load

04/16/2012 09:45 AM


The file 'dl.cgi' is used to generate temporary speed-limited symlinks for each user downloading each file.
For example; you can set your non-premium users to download at 100KB/sec and the file itself 'dl.cgi' will create a symlink ( that is capped at that speed.

If you have a lot of users downloading different files  (busy site), then this will naturally cause the CPU to reach almost 90% or 100%

Here are some solutions to help keep the CPU at reasonable levels.
- Upgrade the CPU and the RAM  (This also helps reduce file I/O bottlenecks)
- Upgrade to Sibsoft's Nginx-Mod & Nginx WebServer. This will dramatically free up your server resources during peak periods.   (You can still set the speed-limit for your non-premium users with nginx too.)
Otherwise, if you're still using Apache (web-server) and if you don't mind when your non-premium users download at full-speed. Login to your website as admin user and go here: Setting-->User Limits  and  look for the option Generate DIRECT links  and make sure each box is checked  (Free, Registered, Premium)