Bob Radvanovsky's picture

I wanted to know if the LAMP 'turnkey' includes the Zend Optimizer (version 3.0, 3.3 or greater) on the most recent version.  Could someone please let me know if this is true?  Thanks.

 

-r

Forum: 
Neil Aggarwal's picture

I loaded the LAMP appliance and went to http://[serverIP]/phpinfo.php

The PHP info page states this:

Zend Engine: 220060519

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

It is not the version you are looking for, but I hope that helps.

Bob Radvanovsky's picture

Out of the box, the Zend Engine is @ v2.2.0.  If you need to install a newer release of Zend Optimizer this poses a problem.  I have had nothing but trouble with Zend (miscompatabilities between releases, let alone in between them).  I was hoping that someone would know outside of the standard boilerplated excuse...guess I was wrong.

Thanks, anyway, though.  I'll stick to whatever works - no Zend'd encryption.

Neil Aggarwal's picture

I have compiled PHP with Zend before, it is not bad.  I have never tried doing an upgrade of Zend so I am sure you are right, it would probably not be nice.

Maybe the best thing is to start from the core appliance and add from there.

Liraz Siri's picture

We use xcache for our PHP caching and it works great. We might add that to future versions of appliances by default. It just needs more testing to make sure nothing breaks.
apt-get install php5-xcache
You should then see that xcache is turned on in phpinfo and notice a respectable performance improvement.

Is a patch needed to include xcache in LAMP? If so, I've taken the first steps. What I wonder is whether xcache-admin should be available from the usage.txt/confconsole. First draft with simple install of xcache is available as an attachment here: http://wiki.turnkeylinux.org/Whiteboard/PHP_acceleration. I need to do additional work if the web-based xcache administration page is to be available. Give the word, and I or we will proceed.

I've finished an XCache patch for TKL's LAMP stack. I'm going to try to post it as an attachment over here: http://wiki.turnkeylinux.org/Whiteboard/PHP_acceleration

Credentials for LAMP are the same as the existing stack.

Credentials for XCache-Admin page: username: admin, Password: admin

Any feedback would be appreciated. Saw this was a high priority blueprint. Hope someone can still make use of it.

Rik

Liraz Siri's picture

Kudos. The patch looks good. I see that you've thought of enabling the admin interface for xcache. That may be a good idea but on the other hand I've been using xcache for a couple of years now and have never found the need to log into its admin interface. Also it would be problematic to enable an admin interface that has default passwords without writing an installation hook and I'm doubtful whether xcache admin interface is important enough to warrant another password screen. We'll see.

Bottom line, since there seems to be significant community interest in this we'll enable xcache in the upcoming beta Lucid builds. If there are issues with acceleration we should be able to catch them on a per-appliance basis, with the help of the community of course.

I forgot to post the build notes for the appliance. Without the admin interface, XCache is as easy as: apt-get install php5-cache on with the LAMP appliance.

With the XCache admin interface, build notes are something like this:

XCache + LAMP Build Notes

Download TKL LAMP VMs.

Import LAMP appliance with VirtualBox

Leave hostname alone.

apt-get install php5-xcache
/etc/init.d/apache2 restart
cd /etc/apache2/sites-available
cp default xcache

In xcache, set path to /usr/share/xcache/admin

nano xcache

Configure Apache2

cd /etc/apache2/

Instruct Ampache to listen on port 12323

nano ports.conf
a2ensite xcache

Edit /etc/php5/apache2/php.ini:

nano /etc/php5/apache2/php.ini

Append the following two lines to php.ini to set username "admin" and password "admin"

xcache.admin.user = "admin"
xcache.admin.pass = "21232f297a57a5a743894a0e4a801fc3"

Set permissions

chmod 755 /usr/share/xcache/admin
chown www-data /usr/share/xcache/admin

Restart Apache2

/etc/init.d/apache2 restart

It's my understanding that the LAMP and LAPP 11.0 releases have xcache built in; hopefully that answers the question. Feel like it might.

L. Arnold's picture

RE Xcache:  The perpetual quest to get Magento to show some moderate speed.  When I "apt-get install php5-xcache" on Magento appliance I am told the system is already to the current build.

However, I can't find that Magento sees any Caching going on.

When I search for php.ini in the sytem I find:

etc/php5/cli/php.ini

etc/php5/apache2/php.ini

var/www/magento/php.ini

Magento version is a very short list that seems to be there for Cpanel type installations.

I have been looking around for how to optimize and test Xcache.. this one references how to install and optimize on a Cpanel type server: 

http://www.thewebhostinghero.com/tutorials/xcache-w3tc-on-a-cpanel-serve...

But this is not a CPanel type server, I know.

This link talks about installing/working with memcached or apc on a Magento Server, and specifying the Cache Type in app/etc/local.xml

http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-me...

My local XML does not have a reference to Xcache (or other caches).  Neither do any of my php.ini files that I can find.

So,  should I trust that XCache is working and simply reference Xcache in my local.xml (as apc is being referenced)?  I have tried in the past to get APC to work instead but from what I can see the system will only work with Xcache OR APC and I was never able to remove Xcache (some other posts here follow this quest).

Thoughts on how to proceed?  Thanks to all!

L. Arnold's picture

The reference to setting up cache in Magento  via local.xml.additional had a simple statement to add: 

If you look at: app/etc/local.xml.additional, you will notice that there is a <cache>element that allows you to specify which caching method you are using in the <backend>element. This can have one of the following values:

  • apc
  • memcached
  • xcache

We are dealing with APC here so we’ll just add:

1
2
3
4
5
6
7
8
<global>
...
    <cache>
        <backend>apc</backend>
        <prefix>MAGE_</prefix>
    </cache>
...
</global>

 

However, The TTK local.xml.additional has the following in it saying, to Move the Appropriate code into local.xml.  This is the reference that refers to xcache...(apc/memcached/xcache)..  and I am somewhat stumped as to any control to add to this and/or what I am actually looking at...

<!--
Please note that this file is not merged into configuration. You are supposed to copy appropriate nodes
to app/etc/local.xml manually.
-->
<config>
    <global>
        <session_save><![CDATA[]]></session_save> <!-- db / memcache / empty=files -->
        <session_save_path><![CDATA[]]></session_save_path><!-- e.g. for memcache session save handler tcp://10.0.0.1:11211?persistent=1&weight=2&timeout=10&retry_interval=10 -->
        <session_cache_limiter><![CDATA[]]></session_cache_limiter><!-- see http://php.net/manual/en/function.session-cache-limiter.php#82174 for possible values -->
        <cache>
            <backend></backend><!-- apc / memcached / xcache / empty=file -->
            <slow_backend></slow_backend> <!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages -->
            <slow_backend_store_data></slow_backend_store_data> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether store data in db slow cache backend -->
            <auto_refresh_fast_cache></auto_refresh_fast_cache> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether refresh data in fast cache backend -->
            <memcached><!-- memcached cache backend related config -->
                <servers><!-- any number of server nodes can be included -->
                    <server>
                        <host><![CDATA[]]></host>
                        <port><![CDATA[]]></port>
                        <persistent><![CDATA[]]></persistent>
                        <weight><![CDATA[]]></weight>
                        <timeout><![CDATA[]]></timeout>
                        <retry_interval><![CDATA[]]></retry_interval>
                        <status><![CDATA[]]></status>
                    </server>
                </servers>
                <compression><![CDATA[0]]></compression>
                <cache_dir><![CDATA[]]></cache_dir>
                <hashed_directory_level><![CDATA[]]></hashed_directory_level>
                <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
                <file_name_prefix><![CDATA[]]></file_name_prefix>
            </memcached>
        </cache>
        <remote_addr_headers><!-- list headers that contain real client IP if webserver is behind a reverse proxy -->
            <header1>HTTP_X_REAL_IP</header1>
            <header2>HTTP_X_FORWARDED_FOR</header2>
        </remote_addr_headers>
    </global>
</config>

L. Arnold's picture

Tried to add this within the "global" set of local.xml but fails the server on both front and back end.
 
    <cache>
        <backend>xcache</backend>
        <prefix>MAGE_</prefix>
    </cache>
 
Removed, rebooted, waited.
Site came back up.
 
Same as it ever was.  Will see if I can simply Test for XCache actually being there and working...  As Cron is also not working on the server within Magento (it is working on a Package level) there is a compounding of issues.
 
Sorry to bring this up.

Add new comment