All of lore.kernel.org
 help / color / mirror / Atom feed
* Mounts to Windows 7 and "out of memory" or "insufficient server resources"
@ 2011-09-27 21:36 Steve French
       [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Steve French @ 2011-09-27 21:36 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA; +Cc: samba-technical

FYI - The cifs async write in 3.0 seems to exacerbate problems running
out of memory (apparently) on the Windows 7 system (running as a
server) after a large file copy to the server completes.   I have been
able to reproduce the same problem on Windows Vista Service Pack 2
(which is a good news/bad news story since my earlier testing on
Windows Vista showed hangs on some requests rather than returning out
of memory).  Does not seem to be a problem with any of the Windows
server versions just Windows 7 and Vista so far.

As Pavel noted in an earlier note, increasing MaxWorkItems to 4096 in
the Windows registry solves this.

The cifs async write code does increase large file copy speed
dramatically (more than 15% in most environments) - but we are working
through how to handle the Windows7/WindowsVista problem to see if
there are workarounds.

-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-09-27 23:01   ` Jeremy Allison
  2011-09-27 23:18     ` Steve French
  2011-09-28  5:47   ` Suresh Jayaraman
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Jeremy Allison @ 2011-09-27 23:01 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Tue, Sep 27, 2011 at 04:36:22PM -0500, Steve French wrote:
> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> out of memory (apparently) on the Windows 7 system (running as a
> server) after a large file copy to the server completes.   I have been
> able to reproduce the same problem on Windows Vista Service Pack 2
> (which is a good news/bad news story since my earlier testing on
> Windows Vista showed hangs on some requests rather than returning out
> of memory).  Does not seem to be a problem with any of the Windows
> server versions just Windows 7 and Vista so far.
> 
> As Pavel noted in an earlier note, increasing MaxWorkItems to 4096 in
> the Windows registry solves this.
> 
> The cifs async write code does increase large file copy speed
> dramatically (more than 15% in most environments) - but we are working
> through how to handle the Windows7/WindowsVista problem to see if
> there are workarounds.

Have you notified the Microsoft engineers about this ? I can
give you the right names to bug...

Jeremy.

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
  2011-09-27 23:01   ` Jeremy Allison
@ 2011-09-27 23:18     ` Steve French
  0 siblings, 0 replies; 15+ messages in thread
From: Steve French @ 2011-09-27 23:18 UTC (permalink / raw)
  To: Jeremy Allison; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Tue, Sep 27, 2011 at 6:01 PM, Jeremy Allison <jra-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> Have you notified the Microsoft engineers about this ? I can
> give you the right names to bug...

Yes.

It is trickier than I expected to reproduce (since we send large
writes, not all network interfaces are fast enough to support 127K
write size * 10 requests).


-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2011-09-27 23:01   ` Jeremy Allison
@ 2011-09-28  5:47   ` Suresh Jayaraman
       [not found]     ` <4E82B4ED.4060107-IBi9RG/b67k@public.gmane.org>
  2011-09-28  9:30   ` Shirish Pargaonkar
  2011-09-28 12:00   ` Jeff Layton
  3 siblings, 1 reply; 15+ messages in thread
From: Suresh Jayaraman @ 2011-09-28  5:47 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On 09/28/2011 03:06 AM, Steve French wrote:
> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> out of memory (apparently) on the Windows 7 system (running as a
> server) after a large file copy to the server completes.   I have been
> able to reproduce the same problem on Windows Vista Service Pack 2
> (which is a good news/bad news story since my earlier testing on
> Windows Vista showed hangs on some requests rather than returning out
> of memory).  Does not seem to be a problem with any of the Windows
> server versions just Windows 7 and Vista so far.

The last time when I encountered this, cifs client was reporting "Cannot
allocate memory" a.k.a -ENOMEM error. But, it is actually a
NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
-ENOMEM. I found this mapping confusing atleast initially. Is this
mapping correct?

Not sure do we have a POSIX equivalent of
NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
is more obvious?

Thanks
Suresh

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2011-09-27 23:01   ` Jeremy Allison
  2011-09-28  5:47   ` Suresh Jayaraman
@ 2011-09-28  9:30   ` Shirish Pargaonkar
       [not found]     ` <CADT32eLk5N4WJCMdtcd3MTgR39fCTn4_gQqqobYsxkpcPnfuDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2011-09-28 12:00   ` Jeff Layton
  3 siblings, 1 reply; 15+ messages in thread
From: Shirish Pargaonkar @ 2011-09-28  9:30 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Tue, Sep 27, 2011 at 4:36 PM, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> out of memory (apparently) on the Windows 7 system (running as a
> server) after a large file copy to the server completes.   I have been
> able to reproduce the same problem on Windows Vista Service Pack 2
> (which is a good news/bad news story since my earlier testing on
> Windows Vista showed hangs on some requests rather than returning out
> of memory).  Does not seem to be a problem with any of the Windows
> server versions just Windows 7 and Vista so far

If this is a problem with Windows Vista and Windows 7, it is likely
to be a problem with Windows 2008 Server as well.
Basically Windows server starting Vista perhaps?

>
> As Pavel noted in an earlier note, increasing MaxWorkItems to 4096 in
> the Windows registry solves this.
>
> The cifs async write code does increase large file copy speed
> dramatically (more than 15% in most environments) - but we are working
> through how to handle the Windows7/WindowsVista problem to see if
> there are workarounds.
>
> --
> Thanks,
>
> Steve
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
                     ` (2 preceding siblings ...)
  2011-09-28  9:30   ` Shirish Pargaonkar
@ 2011-09-28 12:00   ` Jeff Layton
       [not found]     ` <20110928080027.2c04b12d-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
  3 siblings, 1 reply; 15+ messages in thread
From: Jeff Layton @ 2011-09-28 12:00 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Tue, 27 Sep 2011 16:36:22 -0500
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> out of memory (apparently) on the Windows 7 system (running as a
> server) after a large file copy to the server completes.   I have been
> able to reproduce the same problem on Windows Vista Service Pack 2
> (which is a good news/bad news story since my earlier testing on
> Windows Vista showed hangs on some requests rather than returning out
> of memory).  Does not seem to be a problem with any of the Windows
> server versions just Windows 7 and Vista so far.
> 
> As Pavel noted in an earlier note, increasing MaxWorkItems to 4096 in
> the Windows registry solves this.
> 
> The cifs async write code does increase large file copy speed
> dramatically (more than 15% in most environments) - but we are working
> through how to handle the Windows7/WindowsVista problem to see if
> there are workarounds.
> 

This is seems likely to be a cifs.ko bug -- it does not respect the
MaxReq parm that the server sends in the negotiate and instead uses a
hardcoded limit of 50 requests (which is tunable via module parm).

What value is the server sending in the NEGOTIATE? Ensuring that
cifs.ko doesn't exceed that value seems like a worthwhile endeavor.
This is likely to be even worse soon when the async read patches are
merged.

-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]     ` <4E82B4ED.4060107-IBi9RG/b67k@public.gmane.org>
@ 2011-09-28 12:06       ` Jeff Layton
       [not found]         ` <20110928080622.5e30429b-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Layton @ 2011-09-28 12:06 UTC (permalink / raw)
  To: Suresh Jayaraman
  Cc: Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Wed, 28 Sep 2011 11:17:25 +0530
Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:

> On 09/28/2011 03:06 AM, Steve French wrote:
> > FYI - The cifs async write in 3.0 seems to exacerbate problems running
> > out of memory (apparently) on the Windows 7 system (running as a
> > server) after a large file copy to the server completes.   I have been
> > able to reproduce the same problem on Windows Vista Service Pack 2
> > (which is a good news/bad news story since my earlier testing on
> > Windows Vista showed hangs on some requests rather than returning out
> > of memory).  Does not seem to be a problem with any of the Windows
> > server versions just Windows 7 and Vista so far.
> 
> The last time when I encountered this, cifs client was reporting "Cannot
> allocate memory" a.k.a -ENOMEM error. But, it is actually a
> NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
> -ENOMEM. I found this mapping confusing atleast initially. Is this
> mapping correct?
> 
> Not sure do we have a POSIX equivalent of
> NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
> is more obvious?
> 

Maybe -EREMOTEIO ?

-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]     ` <20110928080027.2c04b12d-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
@ 2011-09-28 18:25       ` Steve French
  0 siblings, 0 replies; 15+ messages in thread
From: Steve French @ 2011-09-28 18:25 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Wed, Sep 28, 2011 at 7:00 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> On Tue, 27 Sep 2011 16:36:22 -0500
> Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> FYI - The cifs async write in 3.0 seems to exacerbate problems running
>> out of memory (apparently) on the Windows 7 system (running as a
>> server) after a large file copy to the server completes.   I have been
>> able to reproduce the same problem on Windows Vista Service Pack 2
>> (which is a good news/bad news story since my earlier testing on
>> Windows Vista showed hangs on some requests rather than returning out
>> of memory).  Does not seem to be a problem with any of the Windows
>> server versions just Windows 7 and Vista so far.
>>
>> As Pavel noted in an earlier note, increasing MaxWorkItems to 4096 in
>> the Windows registry solves this.
>>
>> The cifs async write code does increase large file copy speed
>> dramatically (more than 15% in most environments) - but we are working
>> through how to handle the Windows7/WindowsVista problem to see if
>> there are workarounds.
>>
>
> This is seems likely to be a cifs.ko bug -- it does not respect the
> MaxReq parm that the server sends in the negotiate and instead uses a
> hardcoded limit of 50 requests (which is tunable via module parm).
>
> What value is the server sending in the NEGOTIATE? Ensuring that
> cifs.ko doesn't exceed that value seems like a worthwhile endeavor.
> This is likely to be even worse soon when the async read patches are
> merged.

Yes, the client should not be exceeding the limit, but more testing
is needed of my earlier patch for that.


-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]         ` <20110928080622.5e30429b-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
@ 2011-09-28 18:27           ` Steve French
       [not found]             ` <CAH2r5msGRvhahCXbAb8mj7c28qUzPxOB5dJjjyQFAZvQxZzY-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Steve French @ 2011-09-28 18:27 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Suresh Jayaraman, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical

On Wed, Sep 28, 2011 at 7:06 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> On Wed, 28 Sep 2011 11:17:25 +0530
> Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:
>
>> On 09/28/2011 03:06 AM, Steve French wrote:
>> > FYI - The cifs async write in 3.0 seems to exacerbate problems running
>> > out of memory (apparently) on the Windows 7 system (running as a
>> > server) after a large file copy to the server completes.   I have been
>> > able to reproduce the same problem on Windows Vista Service Pack 2
>> > (which is a good news/bad news story since my earlier testing on
>> > Windows Vista showed hangs on some requests rather than returning out
>> > of memory).  Does not seem to be a problem with any of the Windows
>> > server versions just Windows 7 and Vista so far.
>>
>> The last time when I encountered this, cifs client was reporting "Cannot
>> allocate memory" a.k.a -ENOMEM error. But, it is actually a
>> NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
>> -ENOMEM. I found this mapping confusing atleast initially. Is this
>> mapping correct?
>>
>> Not sure do we have a POSIX equivalent of
>> NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
>> is more obvious?
>>
>
> Maybe -EREMOTEIO ?

The mapping of NT_STATUS_INSUFFICIENT_SERVER_RESOURCES to posix error
ENOMEM appears to be correct for multiple reasons.  Windows itself maps it this
way when mapping from NT STATUS to DOS errors. For example, on subsequent
requests, I see server returning DOS (!) error for error_no_memory on some
types of SMBs and NT error insufficient_server_resources on others.



-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]     ` <CADT32eLk5N4WJCMdtcd3MTgR39fCTn4_gQqqobYsxkpcPnfuDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-09-28 18:28       ` Steve French
       [not found]         ` <CAH2r5msGzs65HO_YuuUzhp3RNo+rJEB=ey8Hx5=1r=bpWpjWLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Steve French @ 2011-09-28 18:28 UTC (permalink / raw)
  To: Shirish Pargaonkar; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Wed, Sep 28, 2011 at 4:30 AM, Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Tue, Sep 27, 2011 at 4:36 PM, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> FYI - The cifs async write in 3.0 seems to exacerbate problems running
>> out of memory (apparently) on the Windows 7 system (running as a
>> server) after a large file copy to the server completes.   I have been
>> able to reproduce the same problem on Windows Vista Service Pack 2
>> (which is a good news/bad news story since my earlier testing on
>> Windows Vista showed hangs on some requests rather than returning out
>> of memory).  Does not seem to be a problem with any of the Windows
>> server versions just Windows 7 and Vista so far
>
> If this is a problem with Windows Vista and Windows 7, it is likely
> to be a problem with Windows 2008 Server as well.
> Basically Windows server starting Vista perhaps?

I have not been able to reproduce it against Windows 2003
or Windows 2008 server yet, but plan some experiments.
If you have additional test data on this let me know.


-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]             ` <CAH2r5msGRvhahCXbAb8mj7c28qUzPxOB5dJjjyQFAZvQxZzY-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-09-28 19:54               ` Jeff Layton
       [not found]                 ` <20110928155404.12b84af3-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Layton @ 2011-09-28 19:54 UTC (permalink / raw)
  To: Steve French
  Cc: Suresh Jayaraman, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical

On Wed, 28 Sep 2011 13:27:33 -0500
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> On Wed, Sep 28, 2011 at 7:06 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> > On Wed, 28 Sep 2011 11:17:25 +0530
> > Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:
> >
> >> On 09/28/2011 03:06 AM, Steve French wrote:
> >> > FYI - The cifs async write in 3.0 seems to exacerbate problems running
> >> > out of memory (apparently) on the Windows 7 system (running as a
> >> > server) after a large file copy to the server completes.   I have been
> >> > able to reproduce the same problem on Windows Vista Service Pack 2
> >> > (which is a good news/bad news story since my earlier testing on
> >> > Windows Vista showed hangs on some requests rather than returning out
> >> > of memory).  Does not seem to be a problem with any of the Windows
> >> > server versions just Windows 7 and Vista so far.
> >>
> >> The last time when I encountered this, cifs client was reporting "Cannot
> >> allocate memory" a.k.a -ENOMEM error. But, it is actually a
> >> NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
> >> -ENOMEM. I found this mapping confusing atleast initially. Is this
> >> mapping correct?
> >>
> >> Not sure do we have a POSIX equivalent of
> >> NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
> >> is more obvious?
> >>
> >
> > Maybe -EREMOTEIO ?
> 
> The mapping of NT_STATUS_INSUFFICIENT_SERVER_RESOURCES to posix error
> ENOMEM appears to be correct for multiple reasons.  Windows itself maps it this
> way when mapping from NT STATUS to DOS errors. For example, on subsequent
> requests, I see server returning DOS (!) error for error_no_memory on some
> types of SMBs and NT error insufficient_server_resources on others.
> 

I don't know...

ENOMEM has clear connotations -- it tells you the machine (client) is
unable to allocate memory. You might be able to stretch that to mean
that the client is unable to allocate some other resource, but in this
case it's the *server* not the client that's reporting the problem.

It seems probable that DOS error codes just lacked anything better for
this mapping. In our case though, -EREMOTEIO seems like a better
mapping as it makes it clear that it's the server that can't allocate
resources, not the client.

-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]         ` <CAH2r5msGzs65HO_YuuUzhp3RNo+rJEB=ey8Hx5=1r=bpWpjWLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-09-28 19:56           ` Jeff Layton
       [not found]             ` <20110928155648.09c19e8c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Layton @ 2011-09-28 19:56 UTC (permalink / raw)
  To: Steve French
  Cc: Shirish Pargaonkar, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical

On Wed, 28 Sep 2011 13:28:38 -0500
Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> On Wed, Sep 28, 2011 at 4:30 AM, Shirish Pargaonkar
> <shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > On Tue, Sep 27, 2011 at 4:36 PM, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> >> out of memory (apparently) on the Windows 7 system (running as a
> >> server) after a large file copy to the server completes.   I have been
> >> able to reproduce the same problem on Windows Vista Service Pack 2
> >> (which is a good news/bad news story since my earlier testing on
> >> Windows Vista showed hangs on some requests rather than returning out
> >> of memory).  Does not seem to be a problem with any of the Windows
> >> server versions just Windows 7 and Vista so far
> >
> > If this is a problem with Windows Vista and Windows 7, it is likely
> > to be a problem with Windows 2008 Server as well.
> > Basically Windows server starting Vista perhaps?
> 
> I have not been able to reproduce it against Windows 2003
> or Windows 2008 server yet, but plan some experiments.
> If you have additional test data on this let me know.
> 
> 

Most likely, those servers report a MaxMpx >= 50. The only real
question I have is what maxmpx vista and 7 report. If it's <50 then
this is likely our bug, not theirs. It seems quite correct for the
server to return an error if the client exceeds that limit.

-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]             ` <20110928155648.09c19e8c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
@ 2011-09-29  1:22               ` Steve French
  0 siblings, 0 replies; 15+ messages in thread
From: Steve French @ 2011-09-29  1:22 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Shirish Pargaonkar, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical

On Wed, Sep 28, 2011 at 2:56 PM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> On Wed, 28 Sep 2011 13:28:38 -0500
> Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> On Wed, Sep 28, 2011 at 4:30 AM, Shirish Pargaonkar
>> <shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > On Tue, Sep 27, 2011 at 4:36 PM, Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> >> FYI - The cifs async write in 3.0 seems to exacerbate problems running
>> >> out of memory (apparently) on the Windows 7 system (running as a
>> >> server) after a large file copy to the server completes.   I have been
>> >> able to reproduce the same problem on Windows Vista Service Pack 2

For servers other than Windows 7 and Windows Vista, we have
not been able to reproduce the problem, so Windows 2003 and Windows 2008
are probably ok.  I was also unable to reproduce this to Samba or Windows XP

But for mounts to Windows 7 or Windows Vista from Linux cifs for 3.0
kernel or later,
two workarounds for this Windows problem have been found:

1) As Pavel discovered, increasing MaxWorkItems to 4096 in the Windows
registry solves this.
2) Or to workaround this on the Linux client, load the cifs kernel
module with a lower limit on the simultaneous requests per connection
ie
     "modprobe cifs cifs_max_pending=10"
(it would default to 50)





-- 
Thanks,

Steve

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]                 ` <20110928155404.12b84af3-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
@ 2011-09-29  5:12                   ` Suresh Jayaraman
       [not found]                     ` <4E83FE54.7060309-IBi9RG/b67k@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Suresh Jayaraman @ 2011-09-29  5:12 UTC (permalink / raw)
  To: Jeff Layton, Steve French
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On 09/29/2011 01:24 AM, Jeff Layton wrote:
> On Wed, 28 Sep 2011 13:27:33 -0500
> Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
>> On Wed, Sep 28, 2011 at 7:06 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
>>> On Wed, 28 Sep 2011 11:17:25 +0530
>>> Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:
>>>
>>>> On 09/28/2011 03:06 AM, Steve French wrote:
>>>>> FYI - The cifs async write in 3.0 seems to exacerbate problems running
>>>>> out of memory (apparently) on the Windows 7 system (running as a
>>>>> server) after a large file copy to the server completes.   I have been
>>>>> able to reproduce the same problem on Windows Vista Service Pack 2
>>>>> (which is a good news/bad news story since my earlier testing on
>>>>> Windows Vista showed hangs on some requests rather than returning out
>>>>> of memory).  Does not seem to be a problem with any of the Windows
>>>>> server versions just Windows 7 and Vista so far.
>>>>
>>>> The last time when I encountered this, cifs client was reporting "Cannot
>>>> allocate memory" a.k.a -ENOMEM error. But, it is actually a
>>>> NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
>>>> -ENOMEM. I found this mapping confusing atleast initially. Is this
>>>> mapping correct?
>>>>
>>>> Not sure do we have a POSIX equivalent of
>>>> NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
>>>> is more obvious?
>>>>
>>>
>>> Maybe -EREMOTEIO ?
>>
>> The mapping of NT_STATUS_INSUFFICIENT_SERVER_RESOURCES to posix error
>> ENOMEM appears to be correct for multiple reasons.  Windows itself maps it this
>> way when mapping from NT STATUS to DOS errors. For example, on subsequent
>> requests, I see server returning DOS (!) error for error_no_memory on some
>> types of SMBs and NT error insufficient_server_resources on others.
>>
> 
> I don't know...
> 
> ENOMEM has clear connotations -- it tells you the machine (client) is
> unable to allocate memory. You might be able to stretch that to mean
> that the client is unable to allocate some other resource, but in this
> case it's the *server* not the client that's reporting the problem.

Exactly. I have had customers with whom I had hard time explaining this
is not a client side problem because they argue that it is a client side
memory allocation error and the client should be fixed. I couldn't find
any standard text where the current mapping is documented.

> It seems probable that DOS error codes just lacked anything better for
> this mapping. In our case though, -EREMOTEIO seems like a better
> mapping as it makes it clear that it's the server that can't allocate
> resources, not the client.
> 

-EREMOTEIO sounds very close me. Atleast, it communicates it is a remote
server side issue and not a client side issue.


-Suresh

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

* Re: Mounts to Windows 7 and "out of memory" or "insufficient server resources"
       [not found]                     ` <4E83FE54.7060309-IBi9RG/b67k@public.gmane.org>
@ 2011-09-29 10:47                       ` Jeff Layton
  0 siblings, 0 replies; 15+ messages in thread
From: Jeff Layton @ 2011-09-29 10:47 UTC (permalink / raw)
  To: Suresh Jayaraman
  Cc: Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical

On Thu, 29 Sep 2011 10:42:52 +0530
Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:

> On 09/29/2011 01:24 AM, Jeff Layton wrote:
> > On Wed, 28 Sep 2011 13:27:33 -0500
> > Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> >> On Wed, Sep 28, 2011 at 7:06 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> >>> On Wed, 28 Sep 2011 11:17:25 +0530
> >>> Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:
> >>>
> >>>> On 09/28/2011 03:06 AM, Steve French wrote:
> >>>>> FYI - The cifs async write in 3.0 seems to exacerbate problems running
> >>>>> out of memory (apparently) on the Windows 7 system (running as a
> >>>>> server) after a large file copy to the server completes.   I have been
> >>>>> able to reproduce the same problem on Windows Vista Service Pack 2
> >>>>> (which is a good news/bad news story since my earlier testing on
> >>>>> Windows Vista showed hangs on some requests rather than returning out
> >>>>> of memory).  Does not seem to be a problem with any of the Windows
> >>>>> server versions just Windows 7 and Vista so far.
> >>>>
> >>>> The last time when I encountered this, cifs client was reporting "Cannot
> >>>> allocate memory" a.k.a -ENOMEM error. But, it is actually a
> >>>> NT_STATUS_INSUFF_SERVER_RESOURCES error from Server being mapped to
> >>>> -ENOMEM. I found this mapping confusing atleast initially. Is this
> >>>> mapping correct?
> >>>>
> >>>> Not sure do we have a POSIX equivalent of
> >>>> NT_STATUS_INSUFF_SERVER_RESOURCES? Should we map it to a error code that
> >>>> is more obvious?
> >>>>
> >>>
> >>> Maybe -EREMOTEIO ?
> >>
> >> The mapping of NT_STATUS_INSUFFICIENT_SERVER_RESOURCES to posix error
> >> ENOMEM appears to be correct for multiple reasons.  Windows itself maps it this
> >> way when mapping from NT STATUS to DOS errors. For example, on subsequent
> >> requests, I see server returning DOS (!) error for error_no_memory on some
> >> types of SMBs and NT error insufficient_server_resources on others.
> >>
> > 
> > I don't know...
> > 
> > ENOMEM has clear connotations -- it tells you the machine (client) is
> > unable to allocate memory. You might be able to stretch that to mean
> > that the client is unable to allocate some other resource, but in this
> > case it's the *server* not the client that's reporting the problem.
> 
> Exactly. I have had customers with whom I had hard time explaining this
> is not a client side problem because they argue that it is a client side
> memory allocation error and the client should be fixed. I couldn't find
> any standard text where the current mapping is documented.
> 
> > It seems probable that DOS error codes just lacked anything better for
> > this mapping. In our case though, -EREMOTEIO seems like a better
> > mapping as it makes it clear that it's the server that can't allocate
> > resources, not the client.
> > 
> 
> -EREMOTEIO sounds very close me. Atleast, it communicates it is a remote
> server side issue and not a client side issue.
> 

Yeah, I always sort of consider -EIO to be more or less a "catch-all"
error. Report that when you can't translate it to any other allowable
error. -EREMOTEIO is basically -EIO on a remote host -- that seems like
a more reasonable representation of the problem.

-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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

end of thread, other threads:[~2011-09-29 10:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 21:36 Mounts to Windows 7 and "out of memory" or "insufficient server resources" Steve French
     [not found] ` <CAH2r5msivsE_47mESmGR=Xjf2v-kKwi-Qpym2kxuTLPbYudisQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-27 23:01   ` Jeremy Allison
2011-09-27 23:18     ` Steve French
2011-09-28  5:47   ` Suresh Jayaraman
     [not found]     ` <4E82B4ED.4060107-IBi9RG/b67k@public.gmane.org>
2011-09-28 12:06       ` Jeff Layton
     [not found]         ` <20110928080622.5e30429b-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-09-28 18:27           ` Steve French
     [not found]             ` <CAH2r5msGRvhahCXbAb8mj7c28qUzPxOB5dJjjyQFAZvQxZzY-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-28 19:54               ` Jeff Layton
     [not found]                 ` <20110928155404.12b84af3-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-09-29  5:12                   ` Suresh Jayaraman
     [not found]                     ` <4E83FE54.7060309-IBi9RG/b67k@public.gmane.org>
2011-09-29 10:47                       ` Jeff Layton
2011-09-28  9:30   ` Shirish Pargaonkar
     [not found]     ` <CADT32eLk5N4WJCMdtcd3MTgR39fCTn4_gQqqobYsxkpcPnfuDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-28 18:28       ` Steve French
     [not found]         ` <CAH2r5msGzs65HO_YuuUzhp3RNo+rJEB=ey8Hx5=1r=bpWpjWLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-28 19:56           ` Jeff Layton
     [not found]             ` <20110928155648.09c19e8c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-09-29  1:22               ` Steve French
2011-09-28 12:00   ` Jeff Layton
     [not found]     ` <20110928080027.2c04b12d-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-09-28 18:25       ` Steve French

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.