[ 
https://issues.apache.org/jira/browse/CASSANDRA-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834504#action_12834504
 ] 

Gary Dusbabek commented on CASSANDRA-795:
-----------------------------------------

I was able to duplicate this in windows XP by throwing roughly 200MB at a 
socket in short order. SO_RCVBUF and SO_SNDBUF both default to 8k and setting 
them up to 256k didn't address the problem. Since the default values were so 
low, I didn't think that setting them in the multi-MB range was going to prove 
fruitful.

Google wasn't very helpful explaining the underlying cause of the error (stems 
from winsock err code WSAENOBUFS) except for stating the obvious (there isn't 
enough allocated memory somewhere). Taking it all in, I get the sense that when 
you chunk data up to send over a socket, those chunks end up in kernel memory 
(paged), not user memory, and if you use too much of that (varies across 
windows versions), a WSAENOBUFS ensues.

Setting FileStreamTask.CHUNK_SIZE to 32MB solves the problem though. Unless 
there are any objections, I think we'll stick with that solution.

> Streaming broken on windows (FileStreamTask.CHUNK_SIZE is too big).
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-795
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-795
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-set-SO_SNDBUF-bigger.patch, 
> 0002-unit-test-for-streaming-a-big-file.patch
>
>
> Setting chunk size smaller addresses the problem.  We should explore setting 
> SO_SNDBUF higher to see if that fixes the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to