xcache not yet too optimized for PHP 5.4 (with regards to memory usage)?

220 views
Skip to first unread message

Vasileios Lourdas

unread,
May 16, 2013, 12:24:37 PM5/16/13
to xca...@googlegroups.com
Hi,

This is my first message in this group. I did some tests regarding between PHP 5.3 and 5.4, with and without xcache. I got some interesting results:

The peak memory usage is reported by xdebug_peak_memory_usage() function, rounded to megabytes. I tested with PHP versions 5.3.23 and 5.4.13 (the current stable Gentoo Linux versions) and xcache 3.0.1. I used a few sample pages from a project of mine, including database accesses, using the Yii 1.1.13 PHP framework.

My comments from this test:
  • PHP 5.4 has dramatically improved with regards to (peak) memory usage (look at the red and blue bars in the chart), which is what was advertised when HPP 5.4 was initially released. This will be a win win situation for all providers.
  • PHP 5.3 with help from xcache really shines, the peak memory usage drops by a huge amount after the page is read from the cache (look at the blue and yellow bars).
  • I suppose there is room for improvement with xcache and PHP 5.4. Of course, there is already an improvement when using xcache, but relatively to PHP 5.3 and xcache the improvement is smaller, but I guess the xcache developer(s) can squeeze more performance out (red and green bars).
  • Currently the winner (at least with respect to memory usage) is PHP 5.3 with xcache.
This test is entirely focused on memory usage. I did not test the speed, but I intend to.

What are your thoughts on this?

Regards,
Vasilis

Vasileios Lourdas

unread,
Jul 20, 2013, 10:13:28 AM7/20/13
to xca...@googlegroups.com
Any insight on my findings?

xcache

unread,
Jul 20, 2013, 11:23:56 AM7/20/13
to xca...@googlegroups.com
XCache tries to cache it properly, and do it fast. I don't think memory usage is in XCache's optimization goal. I have no idea why it happens like the graph tell, not do i want to confirm it unless there's a critical screw up of unacceptable memory usage


On Sat, Jul 20, 2013 at 10:13 PM, Vasileios Lourdas <v.lo...@gmail.com> wrote:
Any insight on my findings?

--
 
---
You received this message because you are subscribed to the Google Groups "XCache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xcache+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Vasileios Lourdas

unread,
Jul 20, 2013, 12:22:40 PM7/20/13
to xca...@googlegroups.com
Ok, fair enough. I will do some tests though, as I said in my initial message, to see the differences between 5.3 and 5.4.

Thanks!

jn...@indibits.com

unread,
Jan 13, 2014, 3:00:12 AM1/13/14
to xca...@googlegroups.com
I'm a newbie. I'm working on prestashop. Can you suggest me where does xcache saves the cached data. I'm confused of deciding which cache to use Between memcached, xcache and apc.

Remi Collet

unread,
Jan 14, 2014, 10:41:46 AM1/14/14
to xca...@googlegroups.com
Le 13/01/2014 09:00, jn...@indibits.com a écrit :
I'm a newbie. I'm working on prestashop. Can you suggest me where does 
xcache saves the cached data. I'm confused of deciding which cache to use 
Between memcached, xcache and apc.
They are really different caches.

memcached is a network cache  (requires a memcached server)
APC is deprecated, unmaintained
=> obsoleted by Zend Opcache, for opcode cache
=> osboleted by APCU for user data cache
XCache is both a opcode and user data cache.

All those caches don't save data anywhere, they are memory cache.

Remi


On Thursday, May 16, 2013 9:54:37 PM UTC+5:30, Vasilis Lourdas wrote:
Hi,

This is my first message in this group. I did some tests regarding between 
PHP 5.3 and 5.4, with and without xcache. I got some interesting results:


<https://lh3.googleusercontent.com/-kVSp2Ggg-4Y/UZT_WQJ5aEI/AAAAAAAAALE/rNcZNiUNZGY/s1600/php_xcache_benchmarks.png>
The peak memory usage is reported by *xdebug_peak_memory_usage()*function, rounded to megabytes. I tested with PHP versions 5.3.23 and 
5.4.13 (the current stable Gentoo Linux versions) and xcache 3.0.1. I used 
a few sample pages from a project of mine, including database accesses, 
using the Yii 1.1.13 PHP framework.

My comments from this test:

   - PHP 5.4 has dramatically improved with regards to (peak) memory 
   usage (look at the red and blue bars in the chart), which is what was 
   advertised when HPP 5.4 was initially released. This will be a win win 
   situation for all providers.
   - PHP 5.3 with help from xcache really shines, the peak memory usage 
   drops by a huge amount after the page is read from the cache (look at the 
   blue and yellow bars).
   - I suppose there is room for improvement with xcache and PHP 5.4. Of 
   course, there is already an improvement when using xcache, but relatively 
   to PHP 5.3 and xcache the improvement is smaller, but I guess the xcache 
   developer(s) can squeeze more performance out (red and green bars).
   - *Currently* the winner (at least with respect to memory usage) is 
   PHP 5.3 with xcache.

This test is entirely focused on memory usage. I did not test the speed, 
but I intend to.

What are your thoughts on this?

Regards,
Vasilis


    

Reply all
Reply to author
Forward
0 new messages