Re: Memcache with UNIX socket.

2009-01-31 Thread dormando
Hey folks, Yes, please use persistent connections. Be wary of potential bugs causing connections to stack up (creating too many objects, creating a new persistent connection per pageview, etc). The PHP clients make this relatively difficult to do but it's still possible. Also, for note, any rece

Re: Memcache with UNIX socket.

2009-01-30 Thread Abhinav Gupta
I am now thinking of using persistent connection for connecting to memcache server. so that we don't have to create connection again and again, i think this will also lower some over head of TCP/IP for local machine. Regards, -- ===

Re: Memcache with UNIX socket.

2009-01-29 Thread Perrin Harkins
On Wed, Jan 28, 2009 at 7:06 AM, Stephen Johnston wrote: > I've seen this sentiment expressed a few times and while I agree with it for > pure speed, there are some things to consider. One reason I can think of to > use Memcache in this scenario is that almost all of the "in-process" caches > for

Re: Memcache with UNIX socket.

2009-01-29 Thread Perrin Harkins
On Wed, Jan 28, 2009 at 10:36 AM, Henrik Schröder wrote: > I should also add that although in-process caches are the fastest, memcached > is still much, much faster than your average database. It's been a little while, but when I compared connections to a local MySQL (using Unix sockets) vs. a l

Re: Memcache with UNIX socket.

2009-01-29 Thread Perrin Harkins
On Thu, Jan 29, 2009 at 4:33 AM, Swen Thuemmler wrote: > I see a valid reason using memcached (not distributed) on the same > machine: memcached is rock-solid while your garden-variety webserver > tends to need a restart now and then - loosing all cached content, if > you use an in-process cache.

Re: Memcache with UNIX socket.

2009-01-29 Thread Abhinav Gupta
thank you all... now i think that using memcache might not be a big overhead. anyways will try to benchmark the system with IPC (in process cache). then will see what i should implement. Regards, On Thu, Jan 29, 2009 at 3:03 PM, Swen Thuemmler wrote: > > On Wed, Jan 28, 2009 at 11:56:27AM +01

Re: Memcache with UNIX socket.

2009-01-29 Thread Swen Thuemmler
On Wed, Jan 28, 2009 at 11:56:27AM +0100, Henrik Schröder wrote: > If each webserver is only going to access its own memcached server on the > same machine, why are you even using it in the first place? Why not simply > use an in-process cache in each webserver? That's much, much faster in your >

Re: Memcache with UNIX socket.

2009-01-28 Thread Nicolai Scheer
Hi! [in-process cache] Abhinav Gupta wrote: > Hi, > we are using LAMP platform to develop and host our website. > > so, can you please tell me something related to PHP. Have a look at APC [1]. It's an php opcode cacher and brings a data store with it where you can place arbitrary data. Greeti

Re: Memcache with UNIX socket.

2009-01-28 Thread Alister Bulman
On Wed, Jan 28, 2009 at 3:46 PM, Abhinav Gupta <4u.abhi...@gmail.com> wrote: > so i want to remove the overhead of TCP/IP from my memcache server, as it > will decrease the time required to serve the page. > > one option that i can also think off is to use Cache Lite with memory based > file syste

Re: Memcache with UNIX socket.

2009-01-28 Thread Abhinav Gupta
i benchmarked this, and after that i got to know that my memcache is creating this overhead. actually i tested Cache Lite (disk based caching). and in that case also overall time for page request is almost same, although we are now doing read and write on disk( which is slower then that of memory).

Re: Memcache with UNIX socket.

2009-01-28 Thread Henrik Schröder
Fair enough, for some platforms an external cache might be the best solution. I should also add that although in-process caches are the fastest, memcached is still much, much faster than your average database. For our website where we use memcached in a distributed way, we can easily do a hundred

Re: Memcache with UNIX socket.

2009-01-28 Thread Abhinav Gupta
Hi, we are using LAMP platform to develop and host our website. so, can you please tell me something related to PHP. Thanks, Regards, Abhinav Gupta

Re: Memcache with UNIX socket.

2009-01-28 Thread Henrik Schröder
That depends completely on what platform you are using, if you're using .Net you could take a look at System.Web.HttpContext.Current.Cache for example, I don't know what's available in various Java frameworks, but you can make a class that wraps a static HashMap easily and you're basically set. For

Re: Memcache with UNIX socket.

2009-01-28 Thread Stephen Johnston
On Wed, Jan 28, 2009 at 5:56 AM, Henrik Schröder wrote: > If each webserver is only going to access its own memcached server on the > same machine, why are you even using it in the first place? Why not simply > use an in-process cache in each webserver? That's much, much faster in your > case sin

Re: Memcache with UNIX socket.

2009-01-28 Thread Abhinav Gupta
Hi Henrik, can you please suggest some solutions for "in-process cache", i have no as such idea of this. Thanks in advance, Regards, -- "The future belongs to those who believe in the beauty of thei

Re: Memcache with UNIX socket.

2009-01-28 Thread Henrik Schröder
If each webserver is only going to access its own memcached server on the same machine, why are you even using it in the first place? Why not simply use an in-process cache in each webserver? That's much, much faster in your case since it has no overhead. You should only use memcached if you want

Memcache with UNIX socket.

2009-01-28 Thread Abhinav Gupta
Hello, we are trying to use memcache for our website. but we are using node based caching (i.e. each webserver has its own memcache, on the same machine). so we are facing the overhead of TCP/IP while connecting to memcache server running on same machine. can anyone provide help for reducing this