![]() |
Quote:
|
I've had a recent experience with FreeBSD servers and Erwin is right, it's really a good distro to use.
But with Lighttpd reference I haven't really had a chance to play with it much in a production enviroment, I'm currently playing around with it on my localhost. Hopefully one day my host can switch it or I could get my own server and use it. |
Ahhh... eA doesn't work with 64bit... didn't know that... that explains it.
|
Quote:
|
Anyone want to share their lighttpd.conf? I can't use the quake.net one as my server crashes with it (server 500 error).
I'll share the tweaks I've made to mine: Add these lines to the top: server.max-keep-alive-requests = 0 server.max-fds = 2048 server.stat-cache-engine = "fam" Basically, switch off keep-alive (well, it helps to speed things up on my webserver), double the maxed opened files from 1024 to 2048 (if you have a busy server) and use the stat cache system. It seems to work well for me so far - let's see how it goes at peak times (it's off-peak now, only 1,000 users online). More info on optimizing lighttpd here: http://www.lighttpd.net/documentation/performance.html |
Hmm, keep alive should help multiplexing web servers like lighttpd. Number of open files should not be an issue if you're not on the shared hosting, and there're no other downsides to enabling keep-alive.
|
How do you get fam/gamin to work? I installed gamin (yum install gamin) and there wasn't any daemons or init scripts to run.
Here is my conf file. It runs fine with apc 3.0.8 but segfaults with 3.0.10. server.event-handler = "linux-sysepoll" server.max-fds = 4096 server.max-keep-alive-requests = 4 server.max-keep-alive-idle = 4 server.max-read-idle = 20 server.max-write-idle = 180 |
Quote:
|
Well, I'm going to get to the basics on that.
The beauty of multiplexed web servers (lighttpd, thttpd, Zeus, nginx, etc) is in that number of connections isn't a choke point, their performance is usually disk (for static file serving) or CPU (for dynamic content) bound. So there's _no_ reason not to enable keep-alive as it eliminates the need to re-open connection for the next request(s), and managing idle connections does not take up any resources for a multiplexed web server utilizing one of the advanced solutions to c10K problem like epoll, rtsig or kqueue. Back to Apache, everyone's disabling keep-alive in Apache because every connection, even an idle one, requires one active Apache process or thread to manage it, taking up memory. I hope it answers your questions. |
For some reason, the default
server.max-write-idle = 360 is too short... I've increased that to 720 and it's still too slow according to the error log. I'll give: server.max-keep-alive-requests = 4 server.max-keep-alive-idle = 4 a try then. :) I'll report back. In relation to kqueue, I'm using FreeBSD so I have this line: server.event-handler = "freebsd-kqueue" That covers that yeah? |
Probably should bump up the keep-alive idle time, as not everyone is able to load, read, and make a new request in that time, unless you count the several requests for images and the like. I keep it at about 15 seconds myself.
|
Isn't 6minutes kind of long for server.max-write-idle? I see them in the logs but most of them are errors on transfering very small 10kbyte files. The server tries to send the file over and if it idles for that long, it's a good assumption that the user has canceled.
Quote:
|
Has anyone figured out how to switch logging off in lighttpd? :)
|
Removing mod_accesslog in your server.modules should disable logging.
|
Quote:
So far lighttpd is going well with the short keep-alive time. My logs are filled with the write-idle timeout thing but otherwise it's fine. Mmm... I disabled mod_accesslog but logging still occurred. Any other ideas? |
Are you trying to disable error logging because I don't think you can unless you specify /dev/null as the file output. Removing mod_accesslog only disables accesslog and that works fine for me.
|
Yeah, disabling error logging is what I'm trying to achieve. But I'm rotating the logs at the moment so it's not a big deal. Funny how you can't do it in the config.
|
Erwin may i ask who configured the server , is this steven... cause i also work with dan for almost 6 months. Bu t i have to switch from 2 server system to 1 server system as my hits dropped almost 1000% after we have been banned by the freaking nonsenseTurkish Internet Laws and had to change domain name...
Reason being i am asking whether it was steven i can give your site as a reference to himm.. thnx |
Dan Paultz helps a lot but he also gets Steven Ciaburri from rack911 to assist him - Steven helped me set up my irc server on one of my boxes. Sure, you can give Steven a reference to my site or to me, they'll know.
|
Are you using Lighttpd on a multiple CPU server? If so, are you running just one instance? Are you using a PHP optimizer? What is your memory usage like?
|
Erwin, you could experiment with (or implement) cpu_polling in your kernel to decrease the time it takes for the CPU to communicate with your network card(s) -which can be a bottleneck on busy sites. Fortunately FreeBSD has this option.
Add the following to your kernel and rebuild it, I've been using it with great success on my Dual Xeon system; Code:
#Device polling |
All times are GMT. The time now is 11:08 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|