Hi Henrik, Thanks, this solved and cleared my doubt :)
Regards Leelu On Mon, Jan 5, 2009 at 9:07 PM, Henrik Schröder <[email protected]> wrote: > Hi Leelu, > > No, you're going up entirely the wrong tree with your solution. In your > client, you configure a list of servers that it should use. When you then > use that client, it will distribute items randomly between the servers you > put in the configuration. You can not control which specific server an item > goes to in that case. > > You could in your application have two clients with separate > configurations, and if you have only one server in each, you can then > control which items go where, but you would have to do all the selection > logic in your application yourself. > > But in your case, that appliation logic would be on the lines of checking > if the first server is "full", and then starting up a second one, and then > putting items in that one instead, but that really, really doesn't make > sense. Either you have the memory or you don't. If you have 2GB of free > memory on a machine, you can allocate all of that to memcached, and it will > be used. If you don't, well, you don't, and allocating too much memory to > memcached so it has to swap is obviously a bad idea. If you need to increase > the amount of memory allocated to memcached, you have to stop the process, > change config, and start it up again. It is advisable that you figure out a > good runtime setting before you push your product live, and it is also > advisable that your application should be made to handle the cache not being > there so that you can do runtime changes without having your entire > application fall apart. > > > /Henrik > > > On Mon, Jan 5, 2009 at 10:52, Leelu <[email protected]> wrote: > >> >> Hi Avi, >> >> It's same server(192.168.1.101) but their are 2 daemons listening to >> diff ports. >> >> daemon 1 => 192.168.1.101:11211 (512M) >> daemon 2 => 192.168.1.101:51211 (1024M) >> >> The issue here is I am able to store new Data, But Data retreival is >> not consistent. >> >> I am in doubt whether above works properly if the memory in daemon 1 >> is filled will it try to store in daemon 2 or not, looks lije it's >> storing, but on accessing the key value pair i am not getting data. >> >> Regards >> Leelu >> >> >> On Jan 5, 2:30 pm, Avi Shahar <[email protected]> wrote: >> > Leelu >> > >> > First off, you shouldn't be using the cache server as the *only* source >> for your data, it should duplicated data for fast lookup times and reduced >> locks/requests on the source. Therefore, if you take down the server >> temporarily and bring it back up, within X requests it should be refilled >> with the correct data again. >> > >> > What I am suggesting is that you *initially* start the server with a >> bigger max memory. >> > >> > Note that if the server is "full", new insertions will succeed and >> merely kick out items using LRU. Because the Memcached server does not store >> the original copy of the data, you don't lose it because you can always >> recreate that data and re-insert it into Memcached. >> > -- >> > Avi >> > >> > -----Original Message----- >> > From: [email protected] [mailto:[email protected]] On >> Behalf Of Leelu >> > Sent: Monday, January 05, 2009 11:24 AM >> > To: memcached >> > Subject: Re: Storing an Item in a memcached daemon listening to specific >> port >> > >> > Hi Avi, >> > >> > the problem is I don't want to kill the already running daemon (512M), >> > bcoz many ongoing processes are using that Cached Data, that is why i >> > started an another daemon with a diff port listening to it with more >> > memory. >> > >> > Regards >> > Leelu >> > On Jan 5, 2:17 pm, Avi Shahar <[email protected]> wrote: >> > > Leelu, >> > >> > > You can assign the Memcached server a maximum memory size (say 1024MB) >> - this does not mean that the server will take up that much memory. It means >> it can grow to such size and no more. Thus, you should be better off using >> one server, and setting its maximum memory size to 1024, rather than running >> two instances at 512. >> > >> > > This will simplify your life tremendously, and should work just as >> fine (in fact, probably better). >> > >> > > Cheers >> > > -- >> > > Avi >> > >> > > -----Original Message----- >> > > From: [email protected] [mailto:[email protected]] >> On Behalf Of Leelu >> > > Sent: Monday, January 05, 2009 10:52 AM >> > > To: memcached >> > > Subject: Re: Storing an Item in a memcache daemon listening to >> specific port >> > >> > > I am using to access the items on same server, where the client is a >> > > commandline php script. >> > >> > > This is the situation why I planned to do like this. >> > >> > > I ran a memcache daemon with ip 192.168.1.101 with port 11211 having a >> > > memory of 512MB >> > >> > > Later I checked that amount of data what i need to cache is more. So I >> > > can't dynamically increase the memory of currently running daemon, >> > > instead I ran another daemon listening on different port with more >> > > memory assigned to it. >> > >> > > Now I need to access the key value pair, So i need to know where that >> > > got stored. >> > >> > > On Jan 5, 12:46 pm, "Joseph Engo" <[email protected]> wrote: >> > > > Well, depending on the client you are using you _could_ but what is >> your >> > > > motivation for wanting to do that ? >> > >> > > > Essentially you would need to create 2 separate instances. >> > >> > > > On Mon, Jan 5, 2009 at 2:06 AM, Leelu <[email protected]> wrote: >> > >> > > > > Hi, >> > >> > > > > I have two memcache daemons running on same server, which are >> > > > > listening to say port 'a' and port 'b'. >> > >> > > > > Now Can I store an item specifically to port 'a' or port 'b' and >> > > > > retreive these items back similarly >> > >> > > > > Regards >> > > > > Leelu >> > > -- Leelu
