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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Best performance - which technique?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2005, 10:22 AM
fryk fryk is offline
Member
 
Join Date: Jun 2005
Posts: 16
Default Best performance - which technique?

Hello,

We got mid-size script doing several db queries and some computations.

We are trying to achieve as big performance (requests/sec) as possible.

Which techniques should we choose? Can you recommend something?

- php with truckMMcache?
- some kind of php scripts compiling techniques?
- php via fastcgi?
- perl, python or java?
- OR C/C++ FastCGI? (which is ebay platform we think).

Any feedback greatly appreciated!
Reply With Quote
  #2  
Old 06-01-2005, 10:37 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I think C/C++ fastcgi always gives the best performance. How big a difference it will make depends on the speed of your db queries and computations. But C/C++ fastCGI is much more difficult to code.

So, it depends what is your first priority. :-)
Reply With Quote
  #3  
Old 06-01-2005, 12:30 PM
zellster zellster is offline
Senior Member
 
Join Date: Sep 2004
Posts: 55
eBay is very big on J2EE, not FastCGI:
http://javaoneonline.mentorware.net/...omtopic=Search
Reply With Quote
  #4  
Old 06-01-2005, 12:51 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
It depends on your budget on hardware, you have to invest more on hardware (HPC or cluster) to archive the same level performance that a FastCGI application can provide on a budget server.

Again, it is also depends on your application, if your DB query take long time to execute, then it will not make big difference no matter what is used.
Reply With Quote
  #5  
Old 06-01-2005, 01:37 PM
fryk fryk is offline
Member
 
Join Date: Jun 2005
Posts: 16
Thank for your advices guys!

We assume that our db will do the job and will be fine-tuned.

We are just worried about server/script performance. Lets say we will have to manage 1000 requests per second.

1. We are sure that db will handle this.
2. We are sure that php won't. Apache reloads mod_php each 100 requests because of memory leaks. Don't know how is it in LSWS, which we are very impressed.

So... Anyone knows what is the performance factor for fcgi c/c++ and fcgi php?

They both uses persistent connections (which is greatly performance boot).
Reply With Quote
  #6  
Old 06-01-2005, 02:11 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
LSWS needs to handle PHP memory leaks as well, it is controled by a environment variable of the PHP process.

For the performance factor, just check our benchmark page, http://www.litespeedtech.com/benchmark.html

All benchmark results are almost the BEST request rate you can get with different server API.
Reply With Quote
  #7  
Old 06-01-2005, 07:54 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
I know you said your db can handle it but still want to reiterate the point.

Are you sure your db can handle 1000 requests per second (assuming you want 1000 web req/s) in real-wolrd conditions? If it doesn't, it really doesn't matter what you choose as your script language as they are cpu bound where as dbs are hugely i/o.

If you have almost no db writes, then db is fine. But if you are using non-transaction safe db tables such as mysql's myisam tables then even a few writes per second will absolute destroy your performance goal due to table locks. Innodb would be ticket for mysql.

If LiteSpeed+PHP+LSAPI doesn't do it for you, use a app cluster setup and have it all conect to the same db, provied it can spawn/maintain 1000 active queries threads/processes. Or use a master/slave setup with the db and have each app machine host it's own sql environment so long read queries don't block the cluster performance.

If the queries are very redudant, data returned do not change often, use a middle tier cache such as memcached as lighting fast buffer for your db queries. If you can scale your db setup/data i/o fetch/write, you can scale everything else. With Lsws/PHP, you can always add more machines.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
performance sofatime PHP 8 06-29-2007 03:15 AM
Excellent performance alex General 0 01-25-2007 01:17 PM
Performance tuning - php 4/apc/lsapi bazza PHP 3 08-22-2006 06:21 AM
Bug ? or low performance ?..... MagicMike Bug Reports 9 03-11-2005 09:57 AM
performance feles Install/Configuration 1 09-25-2004 08:30 PM


All times are GMT -7. The time now is 12:28 AM.



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