Date: Sat, 19 Jun 1999 17:17:23 -0600 (MDT) From: Jonathon Doran <doranj@Colorado.EDU> To: freebsd-questions@freebsd.org Subject: Re: makign web pages load fast Message-ID: <199906192317.RAA19769@ucsu.Colorado.EDU> In-Reply-To: <02b201bebaa4$35ef9850$5960b5d1@maxcalvo.net> from "Max Calvo" at Jun 19, 99 03:36:44 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Thanks for your fast response. I really appreciated. I have a 256k line in > my home that I use to run my web server. My server is a P233 with 96 MB RAM > and 4.5GB IDE HD. That helps a bit. The 256k line will limit throughput a bit (although it will perform well). I had a 486 running a web site over a 256k ISDN line without trouble, so the machine isn't the problem. BTW, a little analysis can show that the amount of CPU time needed to saturate an ISDN line is minimal. > OK, Everytime there is a request, Apache have to get the web page from the > HD since I see the HD lights come up when I request a page. However, I need > to know if apache can preload this pages into server RAM and then get them > from there. My analogy is simple, RAM access is faster than HD access. Iam > not taking about using the computer cache or swap file. I am taking RAM > chips. I have been reading a little beat about MFS. Would this be the > solution that I am looking for? Or, Does Apache have a directive that can > preload web pages in RAM. I assume that you are serving mostly static pages (no server side includes), otherwise caching wouldn't help). The current version of Apache (to the best of my knowledge) doesn't not cache content. But then, it probably doesn't need to. Caching can be added by using a package such as Squid available from http://squid.nlanr.net (I suspect this won't help much, for reasons that follow) FreeBSD's filesystem caches data, and applications like Apache make use of this. Although it can't cache data which hasn't been accessed yet. An MFS would certainly result in having things loaded into memory, although it would defeat the buffer cache. It depends on how much data you have to serve. > Right now it takes a few seconds to get a webpage in my internal network > from my webserver. My expectation is that the web page should be loaded in > my client across the room in less than a second. I have a 10MB network at > home with seven computer, 4 of them FBSD. Have you measured your network throughput? At the risk of telling you something you may already know, you will not get 10Mb over that line. (And its Mb not MB, 10-megabit per second if you are using regular ethernet). I get about 500KB/sec over my ethernet -- 1M file in 2 seconds. This seems reasonable to me. The performance curve for ethernet predicts about 5Mb transfers. Network performance will limit throughput more than disk performance will, so you'll probably not see the delay while data comes off disk. Once it starts coming off disk, the file system cache will hold onto it (in core) while the network waits on the network. You can reduce the latency (the initial delay between the request for a file and when data starts to stream in) via an MFS. But most users measure throughput. In summary, I expect your network is limiting throughput, and no amount of caching will improve that. So, how much data is in that web page. Jon Doran To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906192317.RAA19769>