Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 41966 invoked from network); 6 Apr 2009 17:38:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2009 17:38:06 -0000 Received: (qmail 82812 invoked by uid 500); 6 Apr 2009 17:38:06 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 82768 invoked by uid 500); 6 Apr 2009 17:38:06 -0000 Mailing-List: contact general-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@lucene.apache.org Delivered-To: mailing list general@lucene.apache.org Received: (qmail 82758 invoked by uid 99); 6 Apr 2009 17:38:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 17:38:06 +0000 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=FS_REPLICA,HTML_MESSAGE,HTML_OBFUSCATE_05_10,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.217.164 as permitted sender) Received: from [209.85.217.164] (HELO mail-gx0-f164.google.com) (209.85.217.164) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 17:37:57 +0000 Received: by gxk8 with SMTP id 8so4909942gxk.5 for ; Mon, 06 Apr 2009 10:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:content-type; bh=KHV0nHE4CXmVisZ9JuUBG89j0LLMsInOQq2Y2OmaYoA=; b=sVEATi0dIidS3Tzpdqw+fhAYMzaaMVMuz8wIISrdqE4oVVlglURLkweX0bIOzcCnuQ xqUrqum1xVNzihq8UIRlc/XnuQ/unr5ahP5w9Pz3+3xCjHfOvTR42hhK8ojUX0H3Cgjv 2e5FjyJavo861xsFn2aR5nhk34nbcPyyFeK5g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RavN+moSwwsZda1SyzWLRfxs1vqP/2mz7fn0dBwmbZXYw2tCWJfvGqcQJ2lfQXV61v htR5SIhyynlaeKWw9zY8JfZcCyDV7UMlfEzz0be5a5ibKgNcP4xCF4wkwXxVWnXZqyR/ MInUG8A5ZUtYCPzylmbEEIhWjfz05jtE5PY9A= MIME-Version: 1.0 In-Reply-To: <22905809.post@talk.nabble.com> References: <22828976.post@talk.nabble.com> <22905809.post@talk.nabble.com> Date: Mon, 6 Apr 2009 10:37:21 -0700 Received: by 10.150.196.5 with SMTP id t5mr1370872ybf.231.1239039456147; Mon, 06 Apr 2009 10:37:36 -0700 (PDT) Message-ID: Subject: Re: replication caching high query and lot of update From: Ted Dunning To: general@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd47e54a57ae50466e65a0f X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd47e54a57ae50466e65a0f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I hope that these are not yet production machines that you are working on. Otherwise, this could turn into the painful sort of learning experience. That said, changing I/O scheduler is not likely to cause total disaster. Normally, this would be considered highly advanced system administration, but it is relatively safer than many other things you could be doing. On most modern linux machines there is a directory called /sys that allows tuning of various aspects of the system. For changing the I/O scheduler, you need to find the directory /sys/block/ where disk-device corresponds to the disk you are using. You can find out which disk using mount. On one of my machines, mount output looks like this: ... lots of stuff deleted .. /dev/sdb1 on /data1 type ext3 (rw,relatime) That means that /data1 is mount on disk /dev/sdb in partition 1. Looking at /sys/block/sdb/queue, I see this: $ ls /sys/block/sdb/queue/ iosched/ max_sectors_kb read_ahead_kb max_hw_sectors_kb nr_requests scheduler The directory /sys/block/sdb/queue/iosched is used to tune whichever scheduler you have chosen and /sys/block/sdb/queue/scheduler is used to select which scheduler. I can look at my machine to determine which scheduler I am using: $ cat /sys/block/sdb/queue/scheduler noop anticipatory [deadline] cfq The square brackets indicate which one is in play. You can find a bit more information at http://en.wikipedia.org/wiki/Deadline_scheduler or http://www.mjmwired.net/kernel/Documentation/block/switching-sched.txt >From here you are pretty much on your own. You will need to be very careful to observe how your system works and you will need to understand that the "files" under /sys are not actually files, but are actually clever little illusions that let you configure the system (by writing to these "files") and interrogate the status of the system (by reading them). My recommendation on the tunables is: read_expire *Make this relatively small (say 100 or 200 ms)* write_expire *Make this relatively long (5000 to 10000 ms)* fifo_batch *Default is 16 which might be fine. Try larger and smaller values if you have time.* writes_starved *Default is 2, which could be increased reasonably. Try 5 or 10.* front_merges *Leave alone.* The goal with these recommendations is to aggressively starve write performance in favor of read performance. This will slow down your updates somewhat but will hopefully avoid your current problem of long delays. On Mon, Apr 6, 2009 at 3:07 AM, sunnyfr wrote: > > Hi Ted, > > I'm newbie in linux, can you give me advice to set this ? > > Thanks, > > > Ted Dunning wrote: > > > > This may be largely due to poor I/O scheduling at the OS layer. > > > > Try switching to an I/O scheduler that puts reads ahead of writes. > > > > On Wed, Apr 1, 2009 at 8:20 AM, sunnyfr wrote: > > > >> >And about my cache, with a such activity, is it interesting to have a > >> cache > >> stored or not ?? > >> > >> My big point is during replication, my respond time of my request is > sooo > >> slow. > >> > > > > > > > > -- > > Ted Dunning, CTO > > DeepDyve > > > > > > -- > View this message in context: > http://www.nabble.com/replication-caching-high-query-and-lot-of-update-tp22828976p22905809.html > Sent from the Lucene - General mailing list archive at Nabble.com. > > -- Ted Dunning, CTO DeepDyve --000e0cd47e54a57ae50466e65a0f--