public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* XFS mkfs/mount options
@ 2008-06-17  7:33 Mark
  2008-06-17  7:41 ` Dave Chinner
  0 siblings, 1 reply; 6+ messages in thread
From: Mark @ 2008-06-17  7:33 UTC (permalink / raw)
  To: xfs

I have been doing some experiments with XFS on my "hot new desktop system," and I have turned up an interesting bit of info. (Note: My system is an AMD64 X2 2.5GHz running Linux.)

When I mount an XFS volume (thus loading the xfs kernel module), the kernel spawns two CPU-bound threads for "xfslogd" and "xfsdatad". However, it appears that only one of each of these kernel processes is getting any load, as indicated by "ps ax":

 3700 ?        S<     0:00 [xfslogd/0]
 3701 ?        S<     0:19 [xfslogd/1]
 3702 ?        S<     0:00 [xfsdatad/0]
 3703 ?        D<     0:05 [xfsdatad/1]

For each of these kernel threads, only those on CPU #2 are actually pulling notable load. Why is this?

I understand that I may have overlooked some critical tidbit of info in the man pages, or perhaps I have not yet found something online that could explain a default limitation. If so, I would very much enjoy new information about using XFS on a desktop system.

TYIA for your answer(s).

-- 
Mark

"What better place to find oneself than
 on the streets of one's home village?"
      --Capt. Jean-Luc Picard, "Family"

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: XFS mkfs/mount options
@ 2008-06-17  9:20 Mark
  2008-06-17 12:27 ` Justin Piszcz
  0 siblings, 1 reply; 6+ messages in thread
From: Mark @ 2008-06-17  9:20 UTC (permalink / raw)
  To: xfs

--- On Tue, 6/17/08, Dave Chinner <david@fromorbit.com> wrote:

> > For each of these kernel threads, only those on CPU #2
> are actually pulling notable load. Why is this?
> 
> Because your disk interrupts are delivered to that CPU
> only.

Thank you! Tuning my IRQ delivery gave a noticeable speed-up.

-- 
Mark

"What better place to find oneself than
 on the streets of one's home village?"
      --Capt. Jean-Luc Picard, "Family"

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: XFS mkfs/mount options
@ 2008-06-17 17:29 Mark
  2008-06-17 20:41 ` Martin Steigerwald
  0 siblings, 1 reply; 6+ messages in thread
From: Mark @ 2008-06-17 17:29 UTC (permalink / raw)
  To: xfs

--- On Tue, 6/17/08, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:

> From: Justin Piszcz <jpiszcz@lucidpixels.com>
> Subject: Re: XFS mkfs/mount options
> To: "Mark" <musicman529@yahoo.com>
> Cc: xfs@oss.sgi.com
> Date: Tuesday, June 17, 2008, 5:27 AM
> 
> How did you tune your IRQ delivery?

Generically:

echo X > /proc/irq/[IRQ#]/smp_affinity

Where X is a 32-bit hexadecimal bitmask.

My real procedure:

First, I confirmed that both drives (sda and sdb) were triggering different interrupts on the same CPU. "cat /dev/sda > /dev/null &" for activity, followed by "cat /proc/interrupts" a few times. (NOT AS ROOT!) Interrupt 20 was triggering only on the second CPU. Killed the background task.

Repeat, using "cat /dev/sdb > /dev/null &". Interrupt 21, also routing to the second CPU. Bottleneck likely confirmed.

A short hunt in /usr/src/linux/Documentation turned up the smp_affinity files. Looking at /proc/irq/2[01]/smp_affinity shows that both contain "ffffffff", that is, use all available CPU's.

To force the matter, I typed:

echo 00000001 > /proc/irq/21/smp_affinity
echo 00000002 > /proc/irq/20/smp_affinity

I dropped privileges, then repeated the "cat /dev..." above for both drives, confirming that interrupts were indeed going to CPU0 for int21 and CPU1 for int20.

Running a homebrewed multi-threading benchmark showed a possible speed-up for writes on XFS. I have not yet run "official" tests (Bonnie++ or my own) but will do so tonight. I expect the loss from cache-bouncing to be canceled out by the win from concurrent I/O.

-- 
Mark

"What better place to find oneself than
 on the streets of one's home village?"
      --Capt. Jean-Luc Picard, "Family"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-17 20:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17  7:33 XFS mkfs/mount options Mark
2008-06-17  7:41 ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2008-06-17  9:20 Mark
2008-06-17 12:27 ` Justin Piszcz
2008-06-17 17:29 Mark
2008-06-17 20:41 ` Martin Steigerwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox