mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Snook <chris.snook@gmail.com>
To: Mitchell Erblich <erblichs@earthlink.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Suggested code change : Simple : Scale pdflush threads from  desktop to server
Date: Sat, 11 Jul 2009 04:16:13 -0400	[thread overview]
Message-ID: <13a12eea0907110116g62bd0aa1n6f1d35a067351ff1@mail.gmail.com> (raw)
In-Reply-To: <F4B972C6-3FAB-49DB-A409-36B5EF2A7684@earthlink.net>

On Fri, Jul 10, 2009 at 9:25 PM, Mitchell Erblich<erblichs@earthlink.net> wrote:
> Group,
>
>                pdflush threads clean dirty pages
>
>          Under the past simple assumption that a greater number of
>          page daemon threads will have the TENDENCY to clean
>          the pages faster.
>
>        Another assumption is that a server will have at least 2x / 4x the
>        number of drives and memory, so allocating more pdflush() threads
>        makes sense.

That's a rather sweeping generalization.

>        Relying on a recent change, code base on whether the system is
>        a desktop or a server, scale the number of pdthreads() which would
>        result in the below code change.
>
>        The suggestion is to double the MIN number of threads and set the
>        MAX number to 4x.
>
>        ./mm/pdflush.c
>        /* Scale for a server */
>        #define MIN_PDFLUSH_THREADS     4               /* 2x desktop value
> */
>        #define MAX_PDFLUSH_THREADS     32              /* 4x desktop value
> */

So, you're taking a well-established and empirically validated set of
constants, and changing it only in the case where users are least
tolerant of change?  I agree that the existing pdflush tuning is a bit
of a kludge, but this just adds more noise to the data we need to
analyze and optimize pdflush.

>        /*
>         * secondary suggestion is to add a DEBUG type /var/log/system
> messages that
>         * will rate limit independent of desktop or server.
>         */
>
>        else if (nr_pdflush_threads == MAX_PDFLUSH_THREADS) {
>                   /* optional PDFLUSH msg */
>                   if (printk_ratelimit() {
>                                                    printk(KERN_INFO
> "MAX_PDFLUSH_THREADS Limited\n");
>                   }
>         }

Log messages, even at debug level, for normal conditions are a really bad idea.

pdflush definitely needs work, but twiddling constants will, at best,
optimize it for a small subset of the user base for a brief period of
time.  We really need patches that do intelligent things based on
system resources and load, and we need data to support them.

-- Chris

  parent reply	other threads:[~2009-07-11  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11  1:25 Mitchell Erblich
2009-07-11  1:48 ` Mitchell Erblich
2009-07-11  8:16 ` Chris Snook [this message]
2009-07-11  9:54   ` Mitchell Erblich
2009-07-11 13:42 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13a12eea0907110116g62bd0aa1n6f1d35a067351ff1@mail.gmail.com \
    --to=chris.snook@gmail.com \
    --cc=erblichs@earthlink.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®