View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000617 | PHP for OS/2, ArcaOS & eComStation (PHP versions v8.x v7.x v5.x) | Feature Request | public | 2014-07-19 15:58 | 2022-05-14 16:16 |
Reporter | LewisR | Assigned To | psmedley | ||
Priority | low | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | no change required | ||
Summary | 0000617: Investigate building Zend OPcache for PHP 5.3 - 5.5 | ||||
Description | It looks like APC is becoming passé. According to: https://wiki.php.net/rfc/optimizerplus OPcache is to be merged with the 5.5 distro, and Zend is offering the code under their license. | ||||
Additional Information | I'm not necessarily convinced that any of my sites (mainly WordPress, a couple Joomla installs, and now, TYPO3, with some Mantis and MediaWiki thrown in for good measure) would benefit, though I'll try some isolated testing on a *nix box. Meanwhile, if you're bored, Paul, here's the link to the source, which is supposed to be good for PHP 5.2 on up (though they say that 5.2 support is likely to be orphaned): https://github.com/zendtech/ZendOptimizerPlus/ Cheers Lewis | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
|
I have my hands full with apr-unix right now - but will try get to it... |
|
You are running PHP 5.3? |
|
Indeed, I am, Paul (5.3.28). |
|
Not tested at all, but please try http://smedley.id.au/tmp/opcache.zip Needs mmap.dll and pthr01.dll from rpm |
|
Not quite there yet, Paul. ;-) [Fri Aug 01 22:04:28 2014] [info] mod_ssl/2.2.27 compiled against Server: Apache/2.2.27, Library: OpenSSL/1.0.1h Fri Aug 1 22:04:30 2014 (537390048): Fatal Error Unable to allocate shared memory segment of 134217728 bytes: mmap: Permission denied (13) Creating 00C3_01.TRP The above is with php.ini configured as: zend_extension=j:/APPS/php5/modules/opcache.dll [opcache] opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1 (The same error occurs if using the default memory consumption of 64MB.) [j:\apps\apache2]dir j:\usr\lib\mmap.dll 11-02-11 12:14 8,574 124 mmap.dll [j:\apps\apache2]dir j:\usr\lib\pthr01.dll 4-25-14 15:49 7,879 124 pthr01.dll PMdll reports intermittent issues loading gcc444.dll (even after I have libpath set as I normally do to start Apache), but I don't think that's it. Both mmap.dll and pthr01.dll are in libpath. Is there any way to test mmap to make sure that it is working as expected? Both modules seem to load their dependencies (according to PMdll). TRP file, attached. |
|
I should add the following: The above was run on my ThinkPad t43, using the 14.105_UNI kernel(though I got similar results on my test server). and THANK YOU for taking the time and effort to build (and hopefully debug) this! Cheers |
|
Possible help for the permission denied message (WAG): http://stackoverflow.com/questions/17202741/why-does-mmap-fail-with-permission-denied-for-the-destination-file-of-a-file-c |
|
http://smedley.id.au/tmp/opcache.zip is refreshed - no idea if it works, bu apache2/php starts now It was a limitation of our mmap implementation. I had to add code to make it work with out mmap |
|
Thanks, Paul. Testing now (late start on the day). Did you mean "make it work with *our* mmap," or "make it work *without* mmap," BTW? ;-) |
|
Scratch that last question, Paul. Please see 008F_05.TRP, attached. Apache starts, and non-PHP requests respond fine. As soon as PHP is called, we get an "uncommitted memory allocated by MMAP" error thrown from LIBC065. Getting closer, though (I think). At least we can start, now. Thanks! |
|
hmmm... I going to have a crack at building a PHP 5.5 built with opcache enabled - at least then configure will try detect which mmap features are implemented rather than me hacking things manually... will let you know how I go. fyi I can repeat the failure you're seeing here too |
|
Paul, my mmap seems to be: Name : mmap Arch : i386 Version : 20111102 Release : 8.oc00 Size : 778 k Repo : installed From repo : netlabs-rel-2rosenthals Summary : A memory mapped emulation for OS/2-eComStation License : unknown Description: A memory mapped files emulation library. Is this the same one against which you are building (or trying to build) the opcache module? I'm wondering if Yuri might be of some help in this regard, as I am coming up empty even trying to find sources for this. Here's a quick snippet from a conversation earlier today concerning performance improvement with opcache (on Linux x64) with a local copy of a WordPress 3.9.2 site currently hosted on my box: <snip> I then installed Opcache (http://pecl.php.net/package/ZendOpcache) which made quite a difference. Generation times of pages dropped to 0.3-0.5 seconds [from >2], with an occasional long load on the first hit and some operations after that, but overall the site felt a lot more responsive. <snip> It seems that WordPress is a pig (well, that's not news), and static file cache only gets us part of the way. The PHP itself is just bulky (bloated). Anyway, please let me know if I can help in any way, other than leaving you to get to this as time permits. ;-) Cheers |
|
I don't understand right now why opcache isn't working. Is it worth revisiting apc in the meanwhile? |
|
As a stopgap measure, it might be worth trying - as long as you do not have to invest significant time and energy, which would both be better spent here, for longer term reward. I don't recall whether you looked at APC previously. http://php.net/manual/en/apc.requirements.php seems to indicate that "all" that should be required to build APC is pcre (famous last words...LOL). If that is truly the case, then I say let's give it a shot, as *some* optimizer is better than *no* optimizer, and this code isn't getting any slimmer (sad to say). Thanks! |
|
well i got an apc.dll pretty quickly.... but it crashes pthreads on startup. Will have another look this afternoon - gotta get outta bed soon as we're off to dad's for lunch :) |
|
FYI, Yuri dropped a new pthreads just yesterday. Might be worth trying later on. Enjoy lunch! |
|
I spoke with Dmik on IRC last night about the Permission Denied error using anonymous mmap. As he's currently working on mmap, he's suggested he should be able to take a look soon. I've given him a simple testcase that shows the issue. |
|
to be clearer: [21:18:17] <dmik> Smedles: re [21:18:38] <dmik> re mmap, I only implemented support for the offset field so far - and this works now [21:19:16] <dmik> if you mail me more details about your failing mmap case - there is a good chance I'll look at it within the current update cycle as well |
|
Sometimes, it really pays to know the right people at the right time, and to try to do right by them (all the time). Thanks so much for bringing this up to him, and I'll drop him a note, as well. This looks like we're moving in the right direction. Kind of like when Andy and I were working on getting a usable OpenVPN, and finally (as you may recall), it came down to the tap/tun driver only having tap support and no tunneling support; we could have tried different compilers and different options 'til the cows came home, and still we would have been all dressed up with nowhere to go. :-O Cheers |
|
<Smedles> btw any time yet to look at my mmap issue? <truedmik> yes, I will do it this week while updating wpstk and mmap SVNs |
|
see ticket http://trac.netlabs.org/ports/ticket/32 for progress |
|
opcache is included in PHP 7 and above |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-19 15:58 | LewisR | New Issue | |
2014-07-20 18:50 | psmedley | Note Added: 0002783 | |
2014-08-01 19:24 | psmedley | Note Added: 0002792 | |
2014-08-01 23:40 | LewisR | Note Added: 0002793 | |
2014-08-02 06:38 | psmedley | Note Added: 0002794 | |
2014-08-02 11:48 | LewisR | Note Added: 0002795 | |
2014-08-02 11:49 | LewisR | File Added: 00C3_01.TRP | |
2014-08-02 11:52 | LewisR | Note Added: 0002796 | |
2014-08-02 12:00 | LewisR | Note Added: 0002797 | |
2014-08-02 19:16 | psmedley | Note Added: 0002798 | |
2014-08-03 01:55 | LewisR | Note Added: 0002799 | |
2014-08-03 02:28 | LewisR | File Added: 008F_05.TRP | |
2014-08-03 02:31 | LewisR | Note Added: 0002800 | |
2014-08-03 07:44 | psmedley | Note Added: 0002801 | |
2014-08-14 14:24 | LewisR | Note Added: 0002815 | |
2014-08-16 07:03 | psmedley | Note Added: 0002818 | |
2014-08-16 07:16 | LewisR | Note Added: 0002819 | |
2014-08-16 07:48 | psmedley | Note Added: 0002820 | |
2014-08-16 07:52 | LewisR | Note Added: 0002821 | |
2014-08-17 16:43 | psmedley | Note Added: 0002824 | |
2014-08-17 19:04 | psmedley | Note Added: 0002825 | |
2014-08-19 13:15 | LewisR | Note Added: 0002826 | |
2014-08-19 13:15 | LewisR | Note Edited: 0002826 | |
2014-08-19 19:24 | psmedley | Note Added: 0002827 | |
2014-08-22 17:13 | diver | Note Added: 0002828 | |
2022-05-14 16:16 | psmedley | Assigned To | => psmedley |
2022-05-14 16:16 | psmedley | Status | new => resolved |
2022-05-14 16:16 | psmedley | Resolution | open => no change required |
2022-05-14 16:16 | psmedley | Note Added: 0004257 |