Yii Framework Forum: Php 5.5: Apc Vs Zendoptimizer+ - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php 5.5: Apc Vs Zendoptimizer+ Rate Topic: -----

#1 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 13 February 2013 - 12:17 PM

Via Remi Collet's blog:

Quote

This cache could be part of next PHP version 5.5 and replace APC which will be abandoned or maintained only for user data cache.

Anybody here who knows something substantial? Or is this pure speculation on Remi's part?
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,308
  • Joined: 17-January 09
  • Location:Russia

Posted 13 February 2013 - 06:21 PM

It's not speculation:

https://wiki.php.net/rfc/optimizerplus
https://github.com/z...dOptimizerPlus/
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 13 February 2013 - 10:06 PM

Thanks for the link to the RFC. I entirely missed that. This is very interesting as APC hasn't carried any code-level optimization capabilities since (I think) v3.0.13
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#4 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 13 February 2013 - 11:19 PM

For reference: http://grokbase.com/...hp-distribution
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#5 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 07 March 2013 - 12:17 PM

So, ZO+ made it into pecl and it looks like the aforementioned rfc caused another 5.5 alpha being tagged. Anyone tried it yet? It's been in remi's repos for some time now but I couldn't bring myself to install it so far.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#6 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,308
  • Joined: 17-January 09
  • Location:Russia

Posted 07 March 2013 - 01:38 PM

I've tried PECL for Windows build. Worked fine with Yii.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#7 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 07 March 2013 - 01:53 PM

"Worked fine" as in "didn't break stuff" or as in "worth considering for production?"
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#8 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,308
  • Joined: 17-January 09
  • Location:Russia

Posted 07 March 2013 - 06:31 PM

Didn't break stuff. I haven't seriously benchmarked it.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#9 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 23 February 2014 - 03:12 PM

So, a year later I had a closer look at it. Lack of memory management and a partially enigmatic documentation were things that scared me a bit :rolleyes:

After some experimentation, I believe these settings would be best in production:
opcache.validate_timestamps=0
opcache.revalidate_freq=86400
opcache.revalidate_path=1
opcache.enable_file_override=1
opcache.save_comments=0
opcache.load_comments=0

programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#10 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,041
  • Joined: 16-February 11
  • Location:Japan

Posted 23 February 2014 - 06:02 PM

Thank you for the information.

The latest APC (3.1.15-dev) has introduced a new configuration parameter called enable_opcode_cache. And, it is set to false by default.

I didn't notice the change for quite a period and my sites had been working without opcode cache till then. :-[

I don't know why, but PHP 5.4.25 couldn't run with APC opcode cache enabled in my environment. So I had to install Zend Opcode Cache.
0

#11 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 24 February 2014 - 11:24 AM

Yeah, well. I had issues with PHP 5.5.9 and APC 3.1.15, so I bit the bullet and made the switch to opcache+APCu. This has been surprisingly hard: Despite Zend Optimizer being around for YEARS (I remember having used it back in 2005), there is an awfull lot of misinformation and outright FUD around this opcode cache.

Btw, I hardly noticed any difference between opcode being enabled or not with the default settings too. I suspect this is due to the unusually relaxed default settings, which might result into the actual optimizer negating the effects of the opcode cache. I'll try to run some benchmarks as soon as I've got a bare-metal box freed.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#12 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,041
  • Joined: 16-February 11
  • Location:Japan

Posted 25 February 2014 - 10:00 AM

The following might be the best documentation for OPCache:
http://jp2.php.net/m...ook.opcache.php

I miss the one-stop solution of APC with its web interface.
0

#13 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 26 February 2014 - 03:31 AM

View Postsoftark, on 25 February 2014 - 10:00 AM, said:

The following might be the best documentation for OPCache:
http://jp2.php.net/m...ook.opcache.php

*sigh* No, it's not. The really useful parts are scattered all over the web. Just as an example: The optimizer part is hardly explained in the opcache book. I found out by sheer chance how to control that on SO.

So far, the best documentation is hidden in the source code itself :unsure:

View Postsoftark, on 25 February 2014 - 10:00 AM, said:

I miss the one-stop solution of APC with its web interface.

There are quite usable webinterfaces for opcache (currently using this one). But none of them will allow you to control opcache and APCu at once, if that's what you meant.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#14 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,041
  • Joined: 16-February 11
  • Location:Japan

Posted 26 February 2014 - 04:21 AM

I see.
So here you are to compile the tips once again for us.
0

#15 User is offline   Da:Sourcerer 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 28 February 2014 - 12:58 PM

View Postsoftark, on 26 February 2014 - 04:21 AM, said:

So here you are to compile the tips once again for us.

Like in the APC wiki article? Might eventually happen :)
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
1

#16 User is offline   Jinsa86 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-December 13

Posted 03 April 2014 - 04:33 AM

View PostDa:Sourcerer, on 28 February 2014 - 12:58 PM, said:

Like in the APC wiki article? Might eventually happen :)

Hi!

As being coding functions before UAT I didn't started cache optimization. I never used APC nor any yii cache functions and I'm asking myself if it's a good idea to start with yii APCcache and APCu with opcache or if something will be released in yii for opcache php > 5.5? Or maybe is there another solution I could start with and which will be maintained in the future? I'll only need to cache public search for big hits. No need load-balancing for now.

Release target date is set to October and my objective is to use new 5.5 functions (APC is dead, long live opcache!). Am I wrong?

Thanks in advance :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users