* Cache flush question.
@ 2011-01-04 8:44 Daniel Stodden
2011-01-04 14:00 ` Rob Landley
2011-01-04 14:32 ` Trond Myklebust
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Stodden @ 2011-01-04 8:44 UTC (permalink / raw)
To: linux-nfs@vger.kernel.org
Hi anyone.
If somebody's got a sec to enlighten me, there's some phenomenon I
recently came across and found somewhat counterintuitive first.
Whenever I
1. Dirty a bunch of pages backed by an NFS mount on some server.
2. Block the traffic with iptables (TCP, assuming that mattered).
Still plenty of writeback pending.
3. Sync
I see #3 drive the dirty count in /proc/meminfo drop back to
almost-zero, immediately. The sync itself blocks, though.
So the pages are called clean the moment the write got queued, not
acked? Leaving the rest just to retransmits by the socket then? Is this
just done so because one can, or would that order rather matter for
consistency?
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Cache flush question.
2011-01-04 8:44 Cache flush question Daniel Stodden
@ 2011-01-04 14:00 ` Rob Landley
2011-01-04 14:32 ` Trond Myklebust
1 sibling, 0 replies; 5+ messages in thread
From: Rob Landley @ 2011-01-04 14:00 UTC (permalink / raw)
To: Daniel Stodden; +Cc: linux-nfs@vger.kernel.org
On 01/04/2011 02:44 AM, Daniel Stodden wrote:
>
> Hi anyone.
>
> If somebody's got a sec to enlighten me, there's some phenomenon I
> recently came across and found somewhat counterintuitive first.
>
> Whenever I
>
> 1. Dirty a bunch of pages backed by an NFS mount on some server.
>
> 2. Block the traffic with iptables (TCP, assuming that mattered).
> Still plenty of writeback pending.
>
> 3. Sync
>
> I see #3 drive the dirty count in /proc/meminfo drop back to
> almost-zero, immediately. The sync itself blocks, though.
>
> So the pages are called clean the moment the write got queued, not
> acked? Leaving the rest just to retransmits by the socket then? Is this
> just done so because one can, or would that order rather matter for
> consistency?
At a wild guess, maybe you're experiencing what Jim Gettys dubbed
"buffer bloat".
http://lwn.net/Articles/419714/
Specficially, does ifconfig show a txqueuelen of 1000 for your device?
That means the device is buffering 1000 outbound packets, for no readily
apparent reason (other than to screw up latency). With an MTU of 1500
that's a megabyte and a half of outgoing data constipated in the network
layer.
NFS also has some cacheing of its own I don't understand yet, for
"non-idempotent" transactions. Described in this OLS paper:
http://kernel.org/doc/ols/2006/ols2006v2-pages-59-72.pdf
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cache flush question.
2011-01-04 8:44 Cache flush question Daniel Stodden
2011-01-04 14:00 ` Rob Landley
@ 2011-01-04 14:32 ` Trond Myklebust
2011-01-05 23:15 ` Daniel Stodden
1 sibling, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2011-01-04 14:32 UTC (permalink / raw)
To: Daniel Stodden; +Cc: linux-nfs@vger.kernel.org
On Tue, 2011-01-04 at 00:44 -0800, Daniel Stodden wrote:
> Hi anyone.
>
> If somebody's got a sec to enlighten me, there's some phenomenon I
> recently came across and found somewhat counterintuitive first.
>
> Whenever I
>
> 1. Dirty a bunch of pages backed by an NFS mount on some server.
>
> 2. Block the traffic with iptables (TCP, assuming that mattered).
> Still plenty of writeback pending.
>
> 3. Sync
>
> I see #3 drive the dirty count in /proc/meminfo drop back to
> almost-zero, immediately. The sync itself blocks, though.
>
> So the pages are called clean the moment the write got queued, not
> acked? Leaving the rest just to retransmits by the socket then? Is this
> just done so because one can, or would that order rather matter for
> consistency?
Take a look at the 'Writeback:' count, which should turn non-zero when
you hit #3.
The VM allows pages to be either dirty or in writeback, but not both at
the same time. This is not NFS-specific. The same rule applies to local
filesystems.
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cache flush question.
2011-01-04 14:32 ` Trond Myklebust
@ 2011-01-05 23:15 ` Daniel Stodden
2011-01-06 7:33 ` Rob Landley
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Stodden @ 2011-01-05 23:15 UTC (permalink / raw)
To: Trond Myklebust, Rob Landley; +Cc: linux-nfs@vger.kernel.org
On Tue, 2011-01-04 at 09:32 -0500, Trond Myklebust wrote:
> On Tue, 2011-01-04 at 00:44 -0800, Daniel Stodden wrote:
> > Hi anyone.
> >
> > If somebody's got a sec to enlighten me, there's some phenomenon I
> > recently came across and found somewhat counterintuitive first.
> >
> > Whenever I
> >
> > 1. Dirty a bunch of pages backed by an NFS mount on some server.
> >
> > 2. Block the traffic with iptables (TCP, assuming that mattered).
> > Still plenty of writeback pending.
> >
> > 3. Sync
> >
> > I see #3 drive the dirty count in /proc/meminfo drop back to
> > almost-zero, immediately. The sync itself blocks, though.
> >
> > So the pages are called clean the moment the write got queued, not
> > acked? Leaving the rest just to retransmits by the socket then? Is this
> > just done so because one can, or would that order rather matter for
> > consistency?
>
> Take a look at the 'Writeback:' count, which should turn non-zero when
> you hit #3.
>
> The VM allows pages to be either dirty or in writeback, but not both at
> the same time. This is not NFS-specific. The same rule applies to local
> filesystems.
Ah. That explains everything. Actually a question then, thanks for the
clarification :)
Rob Landley's comment regarding tx queue size somewhat made a good point
too. But, given the rates I see, this queues mostly cache pages on the
transport, not copies, right?
Thanks.
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cache flush question.
2011-01-05 23:15 ` Daniel Stodden
@ 2011-01-06 7:33 ` Rob Landley
0 siblings, 0 replies; 5+ messages in thread
From: Rob Landley @ 2011-01-06 7:33 UTC (permalink / raw)
To: Daniel Stodden; +Cc: Trond Myklebust, linux-nfs@vger.kernel.org
On 01/05/2011 05:15 PM, Daniel Stodden wrote:
> On Tue, 2011-01-04 at 09:32 -0500, Trond Myklebust wrote:
>> On Tue, 2011-01-04 at 00:44 -0800, Daniel Stodden wrote:
>>> Hi anyone.
>>>
>>> If somebody's got a sec to enlighten me, there's some phenomenon I
>>> recently came across and found somewhat counterintuitive first.
>>>
>>> Whenever I
>>>
>>> 1. Dirty a bunch of pages backed by an NFS mount on some server.
>>>
>>> 2. Block the traffic with iptables (TCP, assuming that mattered).
>>> Still plenty of writeback pending.
>>>
>>> 3. Sync
>>>
>>> I see #3 drive the dirty count in /proc/meminfo drop back to
>>> almost-zero, immediately. The sync itself blocks, though.
>>>
>>> So the pages are called clean the moment the write got queued, not
>>> acked? Leaving the rest just to retransmits by the socket then? Is this
>>> just done so because one can, or would that order rather matter for
>>> consistency?
>>
>> Take a look at the 'Writeback:' count, which should turn non-zero when
>> you hit #3.
>>
>> The VM allows pages to be either dirty or in writeback, but not both at
>> the same time. This is not NFS-specific. The same rule applies to local
>> filesystems.
>
> Ah. That explains everything. Actually a question then, thanks for the
> clarification :)
>
> Rob Landley's comment regarding tx queue size somewhat made a good point
> too.
Not nearly as good as I thought at the time.
> But, given the rates I see, this queues mostly cache pages on the
> transport, not copies, right?
Easy enough to tell: there's a "Writeback" field in /proc/meminfo. Add
'em up and see what's missing.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-06 7:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 8:44 Cache flush question Daniel Stodden
2011-01-04 14:00 ` Rob Landley
2011-01-04 14:32 ` Trond Myklebust
2011-01-05 23:15 ` Daniel Stodden
2011-01-06 7:33 ` Rob Landley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).