Return-Path: X-Original-To: apmail-mahout-user-archive@www.apache.org Delivered-To: apmail-mahout-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E277F6E31 for ; Wed, 13 Jul 2011 17:58:41 +0000 (UTC) Received: (qmail 37892 invoked by uid 500); 13 Jul 2011 17:58:41 -0000 Delivered-To: apmail-mahout-user-archive@mahout.apache.org Received: (qmail 37799 invoked by uid 500); 13 Jul 2011 17:58:40 -0000 Mailing-List: contact user-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mahout.apache.org Delivered-To: mailing list user@mahout.apache.org Received: (qmail 37790 invoked by uid 99); 13 Jul 2011 17:58:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 17:58:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of srowen@gmail.com designates 209.85.160.170 as permitted sender) Received: from [209.85.160.170] (HELO mail-gy0-f170.google.com) (209.85.160.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 17:58:35 +0000 Received: by gyb13 with SMTP id 13so4661975gyb.1 for ; Wed, 13 Jul 2011 10:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CQwRCk62G58/LIY6zcrE94IBvz5QWahL7fOozjJUG0o=; b=EjNxbWB5jKgVKw1g7WZ1V4K0e0jJSt2ePMbrMMyxWzsS7zYzQzQbtictMqjgSUfJAH e6g49Ci+ennzvZTBHp4Goe+XdTXpXraQA5WeHzoSjNX2red6BCuHFnMmHV5IwPmsRUSG IoRZ8cQsmW3yKfxvWx8YOXo+ejwxB9RvVWMpw= MIME-Version: 1.0 Received: by 10.101.195.17 with SMTP id x17mr1381718anp.53.1310579894582; Wed, 13 Jul 2011 10:58:14 -0700 (PDT) Received: by 10.101.107.14 with HTTP; Wed, 13 Jul 2011 10:58:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 13 Jul 2011 18:58:14 +0100 Message-ID: Subject: Re: Connection Pooling From: Sean Owen To: user@mahout.apache.org Content-Type: multipart/alternative; boundary=0016e6d2848510fd0104a7f729e3 --0016e6d2848510fd0104a7f729e3 Content-Type: text/plain; charset=UTF-8 Yes it reloads after a configurable interval, or on demand. Clearing the cache for a user ID only means that user's data is recomputed. It's not bad to call this frequently per se... I suppose you want to let it cache as much and for as long as is valid and acceptable to your app. Your bottleneck is no longer reading from the DB if you're having it load into memory. On Wed, Jul 13, 2011 at 6:19 PM, Salil Apte wrote: > Awesome, I will give ReloadFromJDBCDataModel a try. How does this > particular data model update itself on database changes? Does it just > happen periodically and if so, can this rate be change easily? > > Lastly, will calling clear(userId) on a recommender frequently be bad > for performance? I'm assuming with such small data amounts that the > actual recommendation algorithm is quite speedy and that the DB is > really the big bottleneck? > > On Wed, Jul 13, 2011 at 2:11 AM, Sean Owen wrote: > > That's all correct, it reads a lot. But you can avoid a lot of it by > using > > caching wrappers. > > You also don't need to dump to a file. Use ReloadFromJDBCDataModel. > > > > On Wed, Jul 13, 2011 at 9:57 AM, Vitali Mogilevsky > > wrote: > > > >> Hey, > >> I got the same problem, of slowness while using MYSQL data model, after > a > >> small research and looking into mysql's query log, revealed that user - > >> user > >> recommendation just floods the database with thousands and thousands of > >> requests. > >> and thats on small database. > >> for now Im dumbping the database into file, and using filedata model > which > >> works much faster > >> > >> > > > --0016e6d2848510fd0104a7f729e3--