473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Script acceleration with ZEND/Truck MMCache

I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the same
as if I would make several queries with different conditions on same data in
DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have low
number of users requesting very demanding content.

Thx for any advice.

Munja


Jul 16 '05 #1
4 3057
Actually, no. Those do opcode caching, which is basically the part where
the Zend Engine reads the php file and transform it into
machine-readable code. Those accelerators will not speed up your queries
at all. If you want to speed up queries, you might want to upgrade to
MySQL4 to benefit from the query caching.

Munja wrote:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the same
as if I would make several queries with different conditions on same data in
DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have low
number of users requesting very demanding content.

Thx for any advice.

Munja


Jul 16 '05 #2
Munja:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the
same as if I would make several queries with different conditions on same
data in DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have
low number of users requesting very demanding content.


The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.
Jul 16 '05 #3
"André Næss" <an*********************@ifi.uio.no> wrote in message
news:bf*********@maud.ifi.uio.no...
Munja:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the
same as if I would make several queries with different conditions on same data in DB.

Calculating data in PHP instead of running several queries (each query has joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation performance and shorten page generation time? As far as I could see, main purpose of these accelerators is to decrease server load while high number of users is requesting more or less simple content and in my case I have
low number of users requesting very demanding content.


The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.


I supose this is where I can maybe make some improvement. Do you know if
there is some PHP performance mesuring tool on the market (something
simillar to Borland Optimizeit for Java)?
Also, how complicated is to make parts of scripts in C? Does it requiere
dramatical Apache/PHP reconfiguration or it can be solved on more or less
simple INCLUDE and CALL from PHP ?
Jul 16 '05 #4
Munja:
The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.
I supose this is where I can maybe make some improvement. Do you know if
there is some PHP performance mesuring tool on the market (something
simillar to Borland Optimizeit for Java)?


There was a thread here very recently about that, but I didn't read it...
Try searching google groups for "php profiler/profiling". It's really
unfortunate that PHP doesn't come with a profiler :/
Also, how complicated is to make parts of scripts in C? Does it requiere
dramatical Apache/PHP reconfiguration or it can be solved on more or less
simple INCLUDE and CALL from PHP ?


If you can isolate the bottleneck and turn it into a function written in C
it shouldn't be too hard. That way you could keep the rest of the script as
it is. I guess you should start here: http://www.php.net/manual/en/zend.php

A search also turned up this: http://www.devnewz.com/2002/0909.html

And I'm sure there are plenty more resources out there.

André Næss
Jul 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Antoine Bajolet | last post by:
Hello, I have a trouble with apache 2.0.48, php 4.3.4, mmcache 2.4.6 and dbg 2.11.23 In apache error log, i got : caught SIGTERM, shutting down PHP Fatal error: Turck MMCache 2.4.6 can...
24
by: Yang Li Ke | last post by:
Hi guys! Anyone know a way so that users purchasing my scripts would not be able to share them with other people ? Yang
1
by: Alex | last post by:
Hi I need to use turck-mmcache on my site. I need answer. My page need to have 10 milion view per day, Is this possible with turck-mmcache to work without any system going down ? Will turck be...
2
by: Marc de Winter | last post by:
Hello all, I'm new to this newsgroup and have tried to search through the archives first, before posting this question. I don't think it has been addressed before. Also, this question is about a...
1
by: siliconmike | last post by:
Is there a way to encrypt my scripts on the server - then load some decryptor module in Apache to real-time decrypt it in memory..? Is there such a method/module ? (I'm using PHP) ...
4
by: lawrence k | last post by:
There is a point in rendering a page of mine where my script pauses for a long time. It is a painful wait - maybe 5 seconds. It is long enough that when I try to show the software to people they...
1
by: Ju Hui | last post by:
Hi All: I am using mmcache on php 4 for a long time. It's cool software. But as you know, it doesn't support php5 well. I have tested eaccelerator on my box. It isn't good as I mmcache, my web...
1
by: Dan | last post by:
The version of Turck MMCache that I have found only works with PHP 4. Has anyone worked on getting it to work for 5.2? Thanks, Dan
2
by: Andy | last post by:
Would this be the script that checks if you've gone to peoplepc.com ? Something checks the reg for a string. I have tried deleting peoplepc.com in the reg and changing the allowed sites as well,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.