| Author |
Message |
bretonmage
Captain


Joined: Feb 21, 2004
Posts: 421
|
Posted:
Sat May 22, 2004 1:52 am |
  |
| hamesh wrote: |
| Perhaps a little, late, but I see that nukecops doesn't use compression. You could reduce server load and speed considerably by use mod_deflate (Apache 2.x) or mod_gzip (Apache 1.x) in combination with a php accelerator. I have a high volume site serving up around 3 million page views per month/500 GB in traffic and these and mod_expires reduce my server load considerably... |
Can you explain how to do this slowly and carefully (for us PHP Newbies)? |
|
|
   |
 |
hamesh
Support Mod


Joined: Feb 13, 2003
Posts: 170
Location: Canada
|
Posted:
Tue May 25, 2004 9:38 pm |
  |
Well if talking about mod_gzip or mod_deflate, you'll have to recompile Apache with one of these modules. I won't get into it here, as most people won't be in a position to do this unless you have root access on your web host.
But almost anyone should be able to enable gzip compression in nuke by doing the following:
Go to http://www.desilva.biz/gzip-test.php and enter your web address. Confirm that there is no compression on your pages (you'll see RED text confirming). If compression is detected (GREEN text and compression level), you've already got compression enabled so can skip to PHP acceleration/caching further down
If compression is not detected, per the above, do:
1) in your .htaccess file add the following:
| Code: |
| php_flag output_buffering 1 |
Go back to http://www.desilva.biz/gzip-test.php and re-test. If you still get a the message in RED that no compression was detected, do:
2) in your mainfile.php, add:
| Code: |
| ob_start("ob_gzhandler"); |
directly below the comments at the top of the file. Return to http://www.desilva.biz/gzip-test.php and re-test. Your pages should now be compressed.
The second step should not be necessary as the compression functions are already in mainfile.php, but depending on your version of nuke, it may not detect your version of PHP so won't enable it.
PHP acceleration/caching falls into the same category as mod_gzip and mod_deflate. But, those without the ability to compile source or install software on their web host can look at jpcache. It works on almost any web host and can reduce page load times. Combine jpcache with compression and you've got a decently fast site and will have reduced server load considerably (by negating the need to compile PHP pages at every http request) and by then compressing the text/html content of your pages (all HTTP/1.1 compliant browsers understand gzip compression and decompress the data automatically).
Oh, an important note about enabling compression... If you have the Forums module enabled in nuke, ensure that you first DISABLED gzip compression in the Forum configuration. When you enable compression in the nuke mainfile, the forums will also be compressed. If you enable compression in both the nuke mainfile and in the Forum configuration, your Forums won't load (you'll have enabled compression twice). |
_________________
 |
|
       |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Jun 13, 2004 11:13 am |
  |
| hamesh wrote: |
| Perhaps a little, late, but I see that nukecops doesn't use compression. You could reduce server load and speed considerably by use mod_deflate (Apache 2.x) or mod_gzip (Apache 1.x) in combination with a php accelerator. I have a high volume site serving up around 3 million page views per month/500 GB in traffic and these and mod_expires reduce my server load considerably... |
CCSP is pulling 7.5 million per month and it uses compression and a php op_code cacher. I notice that belchfire.net takes a good second for even the first byte to load. I'm having the same problem. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
hamesh
Support Mod


Joined: Feb 13, 2003
Posts: 170
Location: Canada
|
Posted:
Mon Jun 14, 2004 3:08 pm |
  |
Ah, you hit me at a bad time. If you try now should be back to normal.
I'm using PHP Accelerator - I highly recommend it. What are you using? |
_________________
 |
|
       |
 |
maciekp
Sergeant


Joined: Sep 09, 2003
Posts: 94
Location: Perth, WA
|
Posted:
Tue Jun 15, 2004 6:41 am |
  |
There's a lot of caching systems to choose from - see my earlier post here.
PHP Accelerator is not an option for me... simply because it doesn't come with the source code  |
_________________ ElectricDice 0.8 - password & MD5, sitekey generator tool
Use SHA1 in Nuke |
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Tue Jun 15, 2004 8:30 am |
  |
I'm trialing ZPS right now, and its adding almost a x2 boost without caching. First byte for CCSP has come down too thanks to this. Next up is caching of the files. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Tue Jun 15, 2004 8:33 am |
  |
I notice right now belchfire.net is coming back with .4 seconds first byte, but overall it took 11 seconds. Your sedotracker php script took 1.6 seconds first byte but took a total of 2.2 seconds to load. It took .2 seconds for your DNS to resolve and almost .5 for the sedotracker. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
hamesh
Support Mod


Joined: Feb 13, 2003
Posts: 170
Location: Canada
|
Posted:
Tue Jun 15, 2004 6:14 pm |
  |
I've used the Zend Performance Suite and performance was impressive, but not $1875 US impressive. Have you tried TurckMMCache? Better performance than PHP Accelerator (second only to Zend) and is open source... |
_________________
 |
|
       |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Wed Jun 16, 2004 6:23 am |
  |
No I haven't tried the caching packages yet except for ZPS. What is the x performance? |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
chris
Support Mod


Joined: Jul 17, 2003
Posts: 12
|
Posted:
Wed Jun 16, 2004 6:56 am |
  |
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Wed Jun 16, 2004 7:21 am |
  |
Yes I saw that, great work. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Wed Jun 16, 2004 8:17 am |
  |
Chris/Hamesh: are you using Googletap? I'm finding it a bit challenging caching and wonder if its not due to ob_start. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Coop
Nuke Soldier


Joined: Mar 03, 2004
Posts: 23
Location: Leeds, UK
|
Posted:
Wed Jun 16, 2004 9:54 am |
  |
I'm trying jpcache and all i'm getting is a blank page. :S I'm using obstart and googletap dunno if thats what is affecting it. |
_________________ My eyes! I'm not supposed to get pudding in them!
http://www.crooze-control.com
Last edited by Coop on Wed Jun 16, 2004 11:44 am; edited 1 time in total |
|
      |
 |
chris
Support Mod


Joined: Jul 17, 2003
Posts: 12
|
Posted:
Wed Jun 16, 2004 10:09 am |
  |
No, I don't use GoogleTap.
I think the question here is: with Googletap and caching both active, how is the caching program seing things? Does it get "rewritten" or "original" URLs to cache? Is mod_rewrite executed "before" the PHP extension that does the caching or is it the other way round? More technically, in which API phase does the caching occur?
I tend to think that the caching program "sees" only the original URLs, because that's also what PHP sees and executes. Thus it shouldn't make a difference whether one uses Googletap or not... |
|
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Wed Jun 16, 2004 11:42 am |
  |
Well the problem I'm thinking is that the data gets buffered in order for GT to work right? How is the cache working in this piece? |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
|
|