does memcached fasten web server?

2010-03-08 Thread p23
Hi,
I do simple benchmark on my web server by issuing 50 queries. I send
10,000 request and it shows by using memcached is slightly slower than
(or almost the same) without memcached. The result shows 216.29
request per second for memcached enabled and 216.51 for memcached
disabled. However, if i run memcached in the same machine as web
server, the result is faster, which is 231.55.

i'm using memcached version 1.4.4 in my dedicated server. i used php
as my memcached client written by abhinav at his site
http://abhinavsingh.com/blog/2009/01/memcached-and-n-things-you-can-do-with-it.

Hope someone can help me.Thanks :D


Re: does memcached fasten web server?

2010-03-08 Thread dormando
> Hi,
> I do simple benchmark on my web server by issuing 50 queries. I send
> 10,000 request and it shows by using memcached is slightly slower than
> (or almost the same) without memcached. The result shows 216.29
> request per second for memcached enabled and 216.51 for memcached
> disabled. However, if i run memcached in the same machine as web
> server, the result is faster, which is 231.55.
>
> i'm using memcached version 1.4.4 in my dedicated server. i used php
> as my memcached client written by abhinav at his site
> http://abhinavsingh.com/blog/2009/01/memcached-and-n-things-you-can-do-with-it.
>
> Hope someone can help me.Thanks :D

What is your app and what exactly is it doing? What are the components, db
queries, etc? have you verified memcached is being accessed instead of the
database?


Re: does memcached fasten web server?

2010-03-08 Thread Brian Moon
No, memcached does not make code run faster.  In fact, it will slow down 
code in the right circumstances.  But, that is not really the point.


See: 
http://code.google.com/p/memcached/wiki/FAQ#Memcached_is_not_faster_than_my_database._Why?



Brian.

http://brian.moonspot.net/

On 3/8/10 8:12 AM, p23 wrote:

Hi,
I do simple benchmark on my web server by issuing 50 queries. I send
10,000 request and it shows by using memcached is slightly slower than
(or almost the same) without memcached. The result shows 216.29
request per second for memcached enabled and 216.51 for memcached
disabled. However, if i run memcached in the same machine as web
server, the result is faster, which is 231.55.

i'm using memcached version 1.4.4 in my dedicated server. i used php
as my memcached client written by abhinav at his site
http://abhinavsingh.com/blog/2009/01/memcached-and-n-things-you-can-do-with-it.

Hope someone can help me.Thanks :D


Re: does memcached fasten web server?

2010-03-09 Thread p23

> What is your app and what exactly is it doing? What are the components, db
> queries, etc?
This test is used to monitor the throughput (req/sec) using apache
bench to compare result between webserver with memcached enabled and
memcached disabled.
I written a php code to request 50 mysql queries. each queries will
return about 4 rows.
These are the details of my hardware and application used.

I used 3 machines for:
Web Server
Database Server
Memcached Server

Server Specification

Processor: AMD64 Phenom (quad core)
RAM: 1.7G
NIC: Ethernet Gigabit
Hard disk: Sata

Software Details

Web Server
--
Ubuntu Server 64-bit version 9.10
PHP Version 5.2.10-2ubuntu6.4
Apache 2.2.12
memcached extension 2.2.5

Mysql Server

Ubuntu Server 64-bit version 9.10
mysql-server 5.1

Memcached Server

Ubuntu Server 64-bit version 9.10
memcached version 1.4.4

Client: using ab (apache bench)
ab -n1 -c50 http://server/read.php

> have you verified memcached is being accessed instead of the
> database?

Yes, I have. I'm using memcached function getExtendedStats();
it shows that all 50 queries are cached. In addition, I use cacti to
monitor my Mysql Server. It shows RAM and CPU usage, and the network
traffic are quite low. So it alleviate the database right?..

But, is it necessary to be faster than server memcached disabled?
Thanks.


Re: does memcached fasten web server?

2010-03-15 Thread Gabriel Sosa
How are you filling your cache? if you are doing in in the same
script, you should run it more than once.

Also I would like to see how your code was done. If you could post
part of it maybe we can see what's going on. We've been using
memcached for years on our PHP application and we got an incredible
performance (once the queries filled the cache)

On Tue, Mar 9, 2010 at 2:37 AM, p23  wrote:
>
>> What is your app and what exactly is it doing? What are the components, db
>> queries, etc?
> This test is used to monitor the throughput (req/sec) using apache
> bench to compare result between webserver with memcached enabled and
> memcached disabled.
> I written a php code to request 50 mysql queries. each queries will
> return about 4 rows.
> These are the details of my hardware and application used.
>
> I used 3 machines for:
> Web Server
> Database Server
> Memcached Server
>
> Server Specification
> 
> Processor: AMD64 Phenom (quad core)
> RAM: 1.7G
> NIC: Ethernet Gigabit
> Hard disk: Sata
>
> Software Details
> 
> Web Server
> --
> Ubuntu Server 64-bit version 9.10
> PHP Version 5.2.10-2ubuntu6.4
> Apache 2.2.12
> memcached extension 2.2.5
>
> Mysql Server
> 
> Ubuntu Server 64-bit version 9.10
> mysql-server 5.1
>
> Memcached Server
> 
> Ubuntu Server 64-bit version 9.10
> memcached version 1.4.4
>
> Client: using ab (apache bench)
> ab -n1 -c50 http://server/read.php
>
>> have you verified memcached is being accessed instead of the
>> database?
>
> Yes, I have. I'm using memcached function getExtendedStats();
> it shows that all 50 queries are cached. In addition, I use cacti to
> monitor my Mysql Server. It shows RAM and CPU usage, and the network
> traffic are quite low. So it alleviate the database right?..
>
> But, is it necessary to be faster than server memcached disabled?
> Thanks.
>



-- 
Gabriel Sosa
Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein


Re: does memcached fasten web server?

2010-03-16 Thread p23


On Mar 15, 8:19 pm, Gabriel Sosa  wrote:
> How are you filling your cache? if you are doing in in the same
> script, you should run it more than once.
>
> Also I would like to see how your code was done. If you could post
> part of it maybe we can see what's going on. We've been using
> memcached for years on our PHP application and we got an incredible
> performance (once the queries filled the cache)

Thank you.
In my situation, items are cached from the set() command on PHP code.
I implemented the code written by abhinav from his site
http://www.google.com/url?sa=D&q=http://abhinavsingh.com/blog/2009/01/memcached-and-n-things-you-can-do-with-it&usg=AFQjCNHDY3chx53RgMSOACBehMhK1mmTSg
i'm using database employee provided by dev.mysql.com at
http://dev.mysql.com/doc/employee/en/employee.html