Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Big Board Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Quad Opterons + FreeBSD + Lighttpd + FastCGI/PHP + APC = Fast vB :) Details »»
Quad Opterons + FreeBSD + Lighttpd + FastCGI/PHP + APC = Fast vB :)
Version: , by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-02-2006 Last Update: Never Installs: 0
 
No support by the author.

Yup, I migrated my forums to new servers (dual xeon to quad opterons) using completely new software - FreeBSD, Lighttpd instead of Apache. Lighttpd is really amazing, and I recommend that everyone switch from Apache to Lighttpd. APC works fine on the setup too. Just sharing.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 05-17-2006, 09:00 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adalren
What kind of problems are you having with lighttpd?

We're using lighttpd + phpfcgi + 64bit CentOS and lately experiencing segfaults from the php processes. I see a few bug listings regarding segfaults on APC and have a hunch it might be that.

BTW, eA does not work on a 64bit OS.
I think it was digitalpoint on vB.com who commented about segfaults and APC under high load.
Reply With Quote
  #43  
Old 05-17-2006, 09:03 PM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #44  
Old 05-17-2006, 09:38 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahhh... eA doesn't work with 64bit... didn't know that... that explains it.
Reply With Quote
  #45  
Old 05-18-2006, 12:00 AM
adalren adalren is offline
 
Join Date: May 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
I think it was digitalpoint on vB.com who commented about segfaults and APC under high load.
That can't be the case since the load is < 1. It seems like a child php process segfaults and serves error pages until the parent process kills it after the # of PHP_FCGI_MAX_REQUESTS. At least it recovers.
Reply With Quote
  #46  
Old 05-18-2006, 05:27 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #47  
Old 05-18-2006, 06:39 PM
kmike kmike is offline
 
Join Date: Oct 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #48  
Old 05-18-2006, 07:42 PM
adalren adalren is offline
 
Join Date: May 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #49  
Old 05-18-2006, 09:45 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kmike
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.
I thought keep alive is only useful for static files? I may be wrong obviously, I'm no expert. No. of files may be significant if there are lot of attachments, again from what I've read, so it's probably more relevant for an attachment server. Enabling keep-alive just means connections are kept longer - I have to say that when I was using apache, I never had keep alive on, even with my image server.
Reply With Quote
  #50  
Old 05-19-2006, 07:44 AM
kmike kmike is offline
 
Join Date: Oct 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #51  
Old 05-19-2006, 12:05 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:14 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
  • Page Generation 0.04566 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete