LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > any suggestions on a configuration Optimized for speed

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2007, 09:05 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Default any suggestions on a configuration Optimized for speed

Hello guys,
I was hoping to get some suggestions out of this thread.
We host several Rails apps using an Apache/Haproxy/Mongrel stack.
I have been checking to see if litespeed is a good replacement for our rails hosting needs. So far I have been impressed with the ease and administration of LSWS. It seems that if this works out we can completely the entire stack with LSWS.
However, I am finding it a roughly a third slower then my apache/H/M stack. I figured it would have something to do with my configuration.

Any advice would be much appreciated
Cheers,
Nathan C

For my environment, I have:
-------------------------------
HARDWARE
-------------------------------
2 servers with:
model name : Dual-Core AMD Opteron(tm) Processor
cpu MHz : 2.4
memory : 1gig

-------------------------------
GENERAL -> Ruby on Rails
-------------------------------
Rails Environment: Production
Max Connections: 100
Environment: LSAPI_MAX_REQS=1000
LSAPI_MAX_IDLE=60
Connection Keepalive Timeout: 60
Response Buffering: No
Back Log: 50
Run On Start Up: Yes
Max Idle Time: 300
Priority: 3
Memory Soft Limit (bytes): 350M
Memory Hard Limit (bytes): 400M
Process Soft Limit: 300
Process Hard Limit: 400

-------------------------------
GENERAL -> Tuning
-------------------------------
-- Connection --
Max Connections: 2000
Connection Timeout (secs): 300
Max Keep-Alive Requests: 1000
Smart Keep-Alive: No
Keep-Alive Timeout (secs): 5
Send Buffer Size (bytes): 0
Receive Buffer Size (bytes): 0
I/O Event Dispatcher: best (All platforms)
Max Cached Small File Size (bytes): 4096
Total Small File Cache Size (bytes): 20M
Max MMAP File Size (bytes): 256K
Total MMAP Cache Size (bytes): 40M
-- Request/Response --
Max Request URL Length (bytes): 8192
Max Request Header Size (bytes): 16380
Max Request Body Size (bytes): 10M
Max Dynamic Response Header Size (bytes): 4K
Max Dynamic Response Body Size (bytes): 10M
Reply With Quote
  #2  
Old 06-14-2007, 09:21 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Since LiteSpeed does dynamic spawn for Rails Application, and cost of Rails framework initialization is very high, and your configuration make LiteSpeed to initialize it again and again. That's why you feel litespeed is slower.

Reduce "Max Connections" to match the number of Mongrels you run for each Rails Application. Set "Max Idle Time" to "not set" or "0" to keep the parent Rails process running, this will avoid repeating Rails initialization.
Turn on sendfile() if Rails page cache is used.
Reply With Quote
  #3  
Old 06-14-2007, 09:33 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Thanks mistwang for the quick reply! I will try that.
Reply With Quote
Reply

Thread Tools
Display Modes

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 -7. The time now is 07:54 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.