Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 44251 invoked from network); 17 Mar 2009 10:26:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2009 10:26:06 -0000 Received: (qmail 22905 invoked by uid 500); 17 Mar 2009 10:26:06 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 22880 invoked by uid 500); 17 Mar 2009 10:26:06 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 22869 invoked by uid 99); 17 Mar 2009 10:26:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 03:26:05 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 10:25:56 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LjWUJ-0002BG-Gv for jcs-users@jakarta.apache.org; Tue, 17 Mar 2009 03:25:35 -0700 Message-ID: <22556218.post@talk.nabble.com> Date: Tue, 17 Mar 2009 03:25:35 -0700 (PDT) From: Yaswanth To: jcs-users@jakarta.apache.org Subject: Re: Implementing Remote Cache using JCS . In-Reply-To: <454360.5312.qm@web38707.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: yaswanth.mtrx@gmail.com References: <22541185.post@talk.nabble.com> <1237227133.27497.331.camel@niall-dell> <454360.5312.qm@web38707.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, Yeah .. initially i was not using any logging configuration .. but now when i configured log4j and set to INFO, it worked very well .. Thanks for the suggestion.. Thanks Yaswanth Aaron Smuts wrote: > > > You should expect to see single ms. latency from the remote server. It's > extremely fast. I can typically get data from mysql behind the RMI remote > cache to the client in less than 10 ms. > > Make sure that the log level is higher than debug. Only run at info or > above. > > Other than that, I can't tell you much. I don't have enough information. > > Perhaps your machine is overloaded. > > Aaron > > > --- On Mon, 3/16/09, Niall Gallagher wrote: > >> From: Niall Gallagher >> Subject: Re: Implementing Remote Cache using JCS . >> To: "JCS Users List" >> Date: Monday, March 16, 2009, 11:12 AM >> Hi Yaswanth, >> >> "my average retrieval time is 2.3 Seconds" >> -is that 2.3 seconds per object or 2.3 seconds per 10,000 >> objects? >> >> Whichever the case- I'd not expect retrieval time from >> a remote cache >> server to be faster than say retrieving from a database, if >> that's what >> you're comparing with. The point of JCS is not to >> compete with database >> drivers in network round-trip retrieval speed. The point is >> to eliminate >> network round trips. >> >> If, in your test, one server is putting an object into the >> cache and you >> are timing how long it takes the other server to retrieve >> it, you won't >> be getting real-world statistics. You should time how long >> it would take >> the second server to retrieve the same object multiple >> times, which is >> what your app would probably be doing in production (if >> your data is >> cacheable i.e. is repeatedly read more than once). Also you >> should have >> a warm-up run in your test because initialising the cache >> takes a couple >> of seconds but only happens at application startup. >> >> The remote cache server is not a distributed cache by >> itself - it exists >> to *coordinate* the distributed cache. The JCS client >> libraries which >> you'll have in each application connect to and retrieve >> objects from the >> remote cache server and then keep copies in local RAM to >> allow them to >> avoid network round trips when they next need the same >> data. The remote >> cache in the meantime keeps each client in sync with other >> clients by >> notifying clients when data changes. >> >> If n=retrieval iteration, you'll probably find that >> when >> >> n=1, timetaken=0.5 seconds >> n=2, timetaken=0.00004 seconds >> n=3, timetaken=0.00004 seconds >> ..and so on. >> >> Then you need to run the same test, but this time comparing >> time taken >> when you repeatedly read from a busy database. Databases >> have built-in >> caches, so for n=2 you'll see a slight improvement, but >> it will still be >> at least hundreds of times slower than retrieving from >> local RAM. >> >> Kind regards, >> >> Niall >> >> >> On Mon, 2009-03-16 at 08:58 -0700, Yaswanth wrote: >> >> > Hi, >> > >> > I am trying to implement Remote Cache using JCS. >> > >> > Below is my Server and Client Code. Here are my >> > >> http://www.nabble.com/file/p22541185/remote.cache.server.ccf >> Server and >> > >> http://www.nabble.com/file/p22541185/remote.cache.client.ccf >> Client Cache >> > configuration files. >> > >> > My ServerCode : >> > RemoteCacheServerFactory.main(new >> String[]{"/remote.cache.server.ccf"}); >> > >> > My Client1 Code : >> > JCS.setConfigFilename( >> "/remote.cache.client.ccf" ); >> > JCS cache = JCS.getInstance( "testCache" ); >> > cache.put("Key"+i, "Value"+i); // >> So many times.. While loop >> > >> > My Client2 Code : >> > JCS.setConfigFilename( >> "/remote.cache.client.ccf" ); >> > JCS cache = JCS.getInstance( "testCache" ); >> > cache.get("Key"+i); // So many times. While >> loop >> > >> > >> > I am running a JCS Remote Server and Starting Two >> Remote Clients. >> > >> > Using One client i am adding 10K Objects into cache >> and after that i am >> > using using another client i am retrieving them. At >> this time my average >> > retrieval time is 2.3 Seconds. >> > >> > When i rerun the test case with 100K objects . My >> average retrieval rate is >> > 302 Seconds. >> > >> > I observed that my retrieval rates are very slow, >> which i think shouldn't >> > be. Can anyone point out where the problem is ? >> > >> > Thanks, >> > Yaswanth > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jcs-users-help@jakarta.apache.org > > > -- View this message in context: http://www.nabble.com/Implementing-Remote-Cache-using-JCS-.-tp22541185p22556218.html Sent from the JCS - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org For additional commands, e-mail: jcs-users-help@jakarta.apache.org