Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento memcached backend? 
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

@Sonassi,

I happy you’re sharing you thoughts and indeed i was, and still is surprised by my numbers. Just tested it again this morning:
Indeed the results are depending on what kind of network i am located at running the test. Having enough bandwith to press the setup.

If you find any flaws on my demosite please let me know if i missed something. - It’s demo and ment to be tested… grin

I’m not quite sure on how you calculate the 600Kb page size ?

<-------------->
Server Software:  Apache/2.2.3
Server Hostname:  demo.magentopartner.com
Server Port:  80

Document Path:  /
Document Length:  23018 bytes

Concurrency Level:  50
Time taken for tests:  100.213 seconds
Complete requests:  47106
Failed requests:  0
Write errors:  0
Total transferred:  1100578678 bytes
HTML transferred:  1084499482 bytes
Requests per second:  471.06 [#/sec] (mean)
Time per request:  106.144 [ms] (mean)
Time per request:  2.123 [ms] (mean, across all concurrent requests)
Transfer rate:  10747.81 [Kbytes/sec] received
<-------------->

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

What is the actual command line you ran for this, e.g.:

ab -kc 50 -n 50 http://demo.magentopartner.com/
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

ab -t100 -c50 http://demo.magentopartner.com/

From our Servers in holland against our Servers in Germany…

- In the morning.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sonassi
Sr. Member
 
Avatar
Total Posts:  217
Joined:  2009-05-20
Manchester, UK
 

He is not lying about the results he is getting. I have also tested it from my local system (see below).

However, it doesn’t look like ‘genuine’ results, not that he is being deliberately misleading, but I am only on a 10MB connection here and I shouldn’t be able to download data at this pace.

In the past, I have customised mod_evasive to serve ‘HTTP1.1 200 OK’ headers, instead of the default ‘HTTP1.1 403 Forbidden’. That way, as far as ab is concerned - it is completing transactions at a phenomenal rate.

Looking at the amount of files Magento loads without an opcode cache (25MB per page!), its a huge IO hog. Add in an opcode cache and its more like 5MB of cache it hits, if said server was completing 420 RPS, you would be looking at a sustained (not burstable) IO read speed of around 2GB p/s. On the other hand, network alone, on an average of 600kb for the demo store homepage at 420 RPS we’re talking 252MB p/s (2 Gb p/s) sustained.

I’ve got to say, if its genuine - I would love to see the complete configuration.

Below is the ab output, attached is the page size breakdown.

[~]ab -kc 60 -t 50 http://demo.magentopartner.com/
This is ApacheBenchVersion 2.0.40-dev <$Revision1.146 $> apache-2.0
Copyright 1996 Adam Twiss
Zeus Technology Ltdhttp://www.zeustech.net/
Copyright 2006 The Apache Software Foundationhttp://www.apache.org/

Benchmarking demo.magentopartner.com (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Finished 24860 requests


Server Software
:        Apache/2.2.3
Server Hostname
:        demo.magentopartner.com
Server Port
:            80

Document Path
:          /
Document Length:        23018 bytes

Concurrency Level
:      60
Time taken 
for tests:   50.074 seconds
Complete requests
:      24860
Failed requests
:        0
Write errors
:           0
Keep
-Alive requests:    24860
Total transferred
:      580915544 bytes
HTML transferred
:       572316628 bytes
Requests per second
:    497.20 [#/sec] (mean)
Time per request:       120.676 [ms] (mean)
Time per request:       2.011 [ms] (meanacross all concurrent requests)
Transfer rate:          11345.98 [Kbytes/sec] received

Connection Times 
(ms)
              
min  mean[+/-sd] median   max
Connect
:        0    0   1.4      0      29
Processing
:    42  119  56.7    107    1164
Waiting
:       29  100  19.2    102     475
Total
:         42  119  57.2    107    1164

Percentage of the requests served within a certain time 
(ms)
  
50%    107
  66
%    111
  75
%    113
  80
%    115
  90
%    184
  95
%    209
  98
%    285
  99
%    416
 100
%   1164 (longest request)
File Attachments
magento_partner.pdf  (File Size: 69KB - Downloads: 311)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

Hi,

When “ab’ing” : http://www.magento-hosting-uk.com

I get a document length of 25K, and using YSlow, i get “primed cache” of 5K. And not the 329K as the Weighted test.

Server Software:  Apache
Server Hostname:  http://www.magento-hosting-uk.com
Server Port:  80

Document Path:  /
Document Length:  25392 bytes

When “ab’ing” : http://demo.magentopartner.com
I get a document length of 23K, and using YSlow, i get “primed cache” of 23K.

Server Software:  Apache/2.2.3
Server Hostname:  demo.magentopartner.com
Server Port:  80

Document Path:  /
Document Length:  23018 bytes

Should’nt the pagesize calculations be based upon Document Length, instead of Worst Case Scenario ?

File Attachments
yslow.www.magento-hosting-uk.com.pdf  (File Size: 72KB - Downloads: 311)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

forgot my own YSlow PDF.

File Attachments
yslow.demo.magentopartner.com.pdf  (File Size: 72KB - Downloads: 384)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

Would my setup become more genuine with only 315Kb of Weighted YSlow Page Size ?

File Attachments
yslow.demo.magentopartner.com.315Kb.pdf  (File Size: 68KB - Downloads: 287)
 
Magento Community Magento Community
Magento Community
Magento Community
 
marknet
Member
 
Total Posts:  46
Joined:  2008-06-19
 

<DELETED> SImpleHelix has fixed the situation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
smlaci
Sr. Member
 
Avatar
Total Posts:  122
Joined:  2008-04-15
Bacau
 

Not a big fan of numbers and calculations so I just tested their demo as an actual user would and I must say it is the fastest Magento store up until now.
So who cares about numbers?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 
smlaci - 17 June 2009 11:45 PM

Not a big fan of numbers and calculations so I just tested their demo as an actual user would and I must say it is the fastest Magento store up until now.
So who cares about numbers?

One big THUMBS UP!.... grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
apl
Member
 
Total Posts:  33
Joined:  2008-12-16
 

Hi, I am using memcached as backend, and it is working. But I just have a feeling it is not working properly because -

when I use memcache.php to check, it says the cache usage is only 0.5MBytes.

256MBytes were allocated to memcached. As Magento is a big programme, I expect it uses up lots of memory for caching. Can anyone tell me what reasonable cache size is for a store with about 300 products?

Thanks a lot!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 
apl - 03 August 2009 06:29 AM

Hi, I am using memcached as backend, and it is working. But I just have a feeling it is not working properly because -

when I use memcache.php to check, it says the cache usage is only 0.5MBytes.

256MBytes were allocated to memcached. As Magento is a big programme, I expect it uses up lots of memory for caching. Can anyone tell me what reasonable cache size is for a store with about 300 products?

Thanks a lot!

How do your app/etc/local.xml file look ?

And have you enabled caching in magento->system->cache mangement ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
apl
Member
 
Total Posts:  33
Joined:  2008-12-16
 

Thanks for replying.

This is my local.xml cache section

<cache>
            <
backend>memcached</backend><!-- apc memcached / empty=file -->
            
        <
memcached><!-- memcached cache backend related config -->
                <
servers><!-- any number of server nodes can be included -->
                    <
server>
                        <
host><![CDATA[127.0.0.1]]></host>
                        <
port><![CDATA[11211]]></port>
                        <
persistent><![CDATA[1]]></persistent>
                    </
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>

Yes, I have enabled Cache in System -> Cache Management

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kammalou
Sr. Member
 
Avatar
Total Posts:  285
Joined:  2009-01-20
Denmark
 

Try replacing: 

<session_save><![CDATA[files]]></session_save>

With

<session_save><![CDATA[memcache]]></session_save>
<
session_save_path><![CDATA[tcp://127.0.0.1:11211?persistent=1&weight;=2&timeout;=10&retry;_interval=10]></session_save_path>
<session_cache_limiter><![CDATA[public,must-revalidate]]></session_cache_limiter>

And refresh your cache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
apl
Member
 
Total Posts:  33
Joined:  2008-12-16
 

Thanks for replying again.

I am using memcache for sessions as well, using exactly the same code advised by you.

I compared the memcache usage before and after using memcache for sessions.

Before: 0.5MBytes (only memcached backend enabled)
After: 6 - 10MBytes

That’s why I assume memcache is working but not working properly for cache.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top