Configuration For static Files

#1
Hey,


I was wondering, what would be the best setup for serving files around 150-200MB in size ?


Here is my current setup, but I wanted to know if there is a more efficient way of doing this.



Static Requests/second 30
Dynamic Requests/second 30
Outbound Bandwidth (bytes/sec) 400K
Inbound Bandwidth (bytes/sec) 0
Connection Soft Limit 20
Connection Hard Limit 10
Grace Period (sec) 20
Banned Period (sec) 60





Regards,


Adam
 

xing

LiteSpeed Staff
#2
Make sure sendfile() is enabled.

Your static requests per second is quite high. If all the files are 200MB, do you really want someone to download 30 of them at once? Go for like 15.

Connection soft should always be smaller than hard. Soft: 15, hard: 30.

Make sure you are check "use client ip in header" just in case they are coming from a proxied connection.

Make sure that you have enough memory. Check "vmstat 1" when the server is running or use our web ui to make sure swap in and swap out is near 0.
 
#3
Here is the vmstat from the UI:


procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 2 208 3580 7560 825408 0 0 1858 80 133 120 1 2 12 85


I have now set these settings in instead:


Static Requests/second 15
Dynamic Requests/second 30
Outbound Bandwidth (bytes/sec) 400K
Inbound Bandwidth (bytes/sec) 0
Connection Soft Limit 5
Connection Hard Limit 10
Grace Period (sec) 20
Banned Period (sec) 60


Use Client IP in Header Yes





Do these sound more appropriate ?
 

xing

LiteSpeed Staff
#4
if this server is ONLY serving those large static files and you don't expect more than 3-4 "downloads" at the same time. I would say it's fine.

But if the server is running a website with images as well, then the connection soft 5 and hard 10 is way too low. It's very easy for some browsers to open up 5 connections just to a site. Would change that to 15 and 25 to be safer.
 
Top