Results 1 to 9 of 9
Thread: Speed up serving large files?
-
11-09-2009, 08:05 PM #1Newbie
- Join Date
- Apr 2009
- Posts
- 11
Speed up serving large files?
Hi,
I can't seem to find a clear answer for that on the web so I would like some help from you guys!
I'm working on a web site which will basically be a flash games portal. I have a dedicated server running Apache 2 on a 100mbit dedicated line but my download speed for large files (flash files of over 5mbs) is really slow. I am thinking this is because of Apache but I don't know much about this. I've read that I should change for a lighter http server for serving static files. The way my server is set up is I have 2 virtual machines running, one doing the PHP processing and the other serving static files, both running Apache, so if I have to change HTTP server for the static files it would be very easy. Although I am not sure if this is necessary or if I can tune Apache to push files faster than this.
Any help will be greatly appreciated.
Thanks!
Edit : download speeds are about 150~200kb/s when I know I can get way faster download than this at home.
-
11-09-2009, 08:51 PM #2Web Hosting Master
- Join Date
- Dec 2005
- Posts
- 3,110
With a fair amount of work you can configure Apache to be almost as fast / better than lighttpd at serving static files.
To be honest you would be better off using lighttpd to start with though.
Bear in mind Virtualization does bring overheads, and with two VM's youve got two different areas of the disk being accessed constantly, so that will slow things down when you get lots of simultanious connections.
You might have the throughput there, but you will lack IOPS (I/O operations per second) so you might want to look into a RAID based setup with multiple disks to help alleviate that.
-
11-09-2009, 09:25 PM #3Newbie
- Join Date
- Apr 2009
- Posts
- 11
I was aware that disk IO will probably be my bottleneck here, so I am aiming a lot towards caching in memory (my PHP is made to use the database at a minimum and cache using APC). If it's possible,
I still think that right now, being the only one accessing my website (it's not public yet), it is weird to only pull 200kb/s out of a server.
I'd like to be able to cache in RAM all the static files on the second server since it's the only process running on that server, is there any way to do this with lighttpd or apache?
-
11-09-2009, 09:38 PM #4Web Hosting Master
- Join Date
- Mar 2009
- Posts
- 2,222
Yes, see Apache documentation one memory caching; for example:
Code:# Enable memory caching CacheEnable mem / # Limit the size of the cache to 1 Megabyte MCacheSize 1024
Apache should be able to drive a 100mbps network link pretty much flat out.Last edited by tim2718281; 11-09-2009 at 09:43 PM.
-
11-09-2009, 10:17 PM #5Newbie
- Join Date
- Apr 2009
- Posts
- 11
I went with virtualization to make backup easier (with LVM partitions) after completely destroying my machine and had to reinstall. I also wanted to split the static content from the dynamic content to make it easier to manage but if I can run 2 instances of apache on the same machine I might reconsider going this way..
-
11-09-2009, 10:32 PM #6Web Hosting Master
- Join Date
- Mar 2009
- Posts
- 2,222
-
11-09-2009, 10:58 PM #7Web Hosting Evangelist
- Join Date
- Nov 2003
- Location
- Marylebone, London, UK
- Posts
- 530
-
11-11-2009, 02:28 AM #8server automation specialist
- Join Date
- Apr 2009
- Location
- Nevada
- Posts
- 662
Use mod_gzip in apache. Its implementation allows for using the compression method gzip for a significant reduction of the volume of web page content served over the http protocol.
James B
►WWW.EZEELOGIN.COM |Setup your Secure Linux SSH Gateway►MEET PCI DSS & ISO 27001 Compliance|Manage & Administer Multiple Linux Servers Quickly & Securely.
-
12-09-2009, 11:47 AM #9Newbie
- Join Date
- Dec 2006
- Posts
- 25
Similar Threads
-
Serving Files with PHP
By Adam Hallett in forum Programming DiscussionReplies: 9Last Post: 12-29-2007, 12:44 AM -
Robust Cluster for Serving Files
By -t7- in forum Dedicated ServerReplies: 9Last Post: 03-09-2007, 12:07 PM -
Serving large files
By Force in forum Hosting Security and TechnologyReplies: 10Last Post: 05-04-2005, 09:17 PM -
serving large files through apache
By eL-ankebut in forum Dedicated ServerReplies: 11Last Post: 05-01-2005, 10:46 AM -
Serving WMV Files... grrrr
By Michael_Tulsa in forum Dedicated ServerReplies: 4Last Post: 10-21-2004, 08:44 AM