Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 13 November 2017

Kernel Debugging & Crash Analysis for Windows, Nashua (Amherst) NH, 4 December 2017

Writing WDF Drivers I: Core Concepts, Nashua (Amherst) NH, 8 January 2018

WDF Drivers II: Advanced Implementation Techniques, Nashua (Amherst) NH, 15 January 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 12  
08 Jan 18 02:04
davs shrus
xxxxxx@gmail.com
Join Date: 01 Mar 2013
Posts To This List: 10
How to increase throughput using IRP based winsock

Dear All, Currently we are using windows kernel sockets for communicating client device. IRP's are used for notifying completion of send and receive data. By using KeQueryPerformanceCounter, we are observing it is taking so much time for after WskSend or WskReceive to get completing request. which in turn reducing performance. WSK_FLAG_NODELAY is using in case of send packets. In registry for tcip interface, tcpackfrequency and tcpnodelay is made 1. Please suggest any option for completing option for better performance wsk using IRPs
  Message 2 of 12  
08 Jan 18 17:02
Jan Bottorff
xxxxxx@pmatrix.com
Join Date: 16 Apr 2013
Posts To This List: 404
How to increase throughput using IRP based winsock

Is the network IRP completion time drastically longer than the packet round= trip time? A network send IRP can't be completed until the local machine k= nows the remote end has received it, as it might still need the buffer to r= etransmit a packet.=20 Jan -----Original Message----- From: xxxxx@lists.osr.com [mailto:bounce-644640-145174@lists= .osr.com] On Behalf Of xxxxx@gmail.com Sent: Sunday, January 7, 2018 11:04 PM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: [ntdev] How to increase throughput using IRP based winsock Dear All, Currently we are using windows kernel sockets for communicating client devi= ce. IRP's are used for notifying completion of send and receive data. By us= ing KeQueryPerformanceCounter, we are observing it is taking so much time f= or after WskSend or WskReceive to get completing request. which in turn red= ucing performance. WSK_FLAG_NODELAY is using in case of send packets. In re= gistry for tcip interface, tcpackfrequency and tcpnodelay is made 1. Please= suggest any option for completing option for better performance wsk using = IRPs=20
  Message 3 of 12  
08 Jan 18 17:06
Don Burn
xxxxxx@windrvr.com
Join Date: 23 Feb 2011
Posts To This List: 1376
How to increase throughput using IRP based winsock

How many IRP's do you have in your pool? I had a customer with a similar complaint, adding more IRP's fixed the problem. Don Burn Windows Driver Consulting Website: http://www.windrvr.com -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Monday, January 08, 2018 2:04 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: [ntdev] How to increase throughput using IRP based winsock Dear All, Currently we are using windows kernel sockets for communicating client device. IRP's are used for notifying completion of send and receive data. By using KeQueryPerformanceCounter, we are observing it is taking so much time for after WskSend or WskReceive to get completing request. which in turn reducing performance. WSK_FLAG_NODELAY is using in case of send packets. In registry for tcip interface, tcpackfrequency and tcpnodelay is made 1. Please suggest any option for completing option for better performance wsk using IRPs --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>
  Message 4 of 12  
09 Jan 18 06:41
davs shrus
xxxxxx@gmail.com
Join Date: 01 Mar 2013
Posts To This List: 10
How to increase throughput using IRP based winsock

@Don Burn We are allocating IRP's for every send or receive request using IoAllocateIrp and allocating WSK buffer using IoAllocateMdl with MmBuildMdlForNonPagedPool option. once the request is completed freeing irps and wsk buffer. Currently we are not allocating pool irps. How many IRP's do you have in your pool? I had a customer with a similar complaint, adding more IRP's fixed the problem.
  Message 5 of 12  
09 Jan 18 07:00
Don Burn
xxxxxx@windrvr.com
Join Date: 23 Feb 2011
Posts To This List: 1376
How to increase throughput using IRP based winsock

I've always created a pool of IRP's with the MDL and buffer, then used those. The allocation costs can be high. Don Burn Windows Driver Consulting Website: http://www.windrvr.com -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Tuesday, January 09, 2018 6:41 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: RE:[ntdev] How to increase throughput using IRP based winsock @Don Burn We are allocating IRP's for every send or receive request using IoAllocateIrp and allocating WSK buffer using IoAllocateMdl with MmBuildMdlForNonPagedPool option. once the request is completed freeing irps and wsk buffer. Currently we are not allocating pool irps. How many IRP's do you have in your pool? I had a customer with a similar complaint, adding more IRP's fixed the problem. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>
  Message 6 of 12  
09 Jan 18 16:40
Jan Bottorff
xxxxxx@pmatrix.com
Join Date: 16 Apr 2013
Posts To This List: 404
How to increase throughput using IRP based winsock

My understanding was IRPs and MDLs already come from an OS pool, although I= agree with Don than some cpu cycles can potentially be shaved off using a = private local pool. It hasn't been established that things are cpu cycle li= mited, so personally would be analyzing where the bottleneck is before tryi= ng to shave cpu cycles. You haven't told us what you consider as "too slow". Are you doing 10M tiny= requests/sec or are you doing 100 huge transfers/sec. As I remember, kerne= l winsock transfers are not buffered, so if you do tiny writes you will get= many tiny packets, which will be very bad for performance. If you look at = some basic performance numbers is the cpu use high, or is cpu use low. If 9= 9% of the request time is spent waiting for a network reply packet, it won'= t help much to shave a few cycles of cpu time off. Are you using a single s= ocket or many sockets?=20 The first thing I usually do when looking at network performance is I put a= packet sniffer on the wire and look at things like remote node response ti= me. I'd also suggest adding some ETW tracing which will generate pretty high re= solution (microsecond or less) performance data. I's easy to include contex= t data so you can filter traces on a specific request. The ETW TraceLogging= facility is very easy to get useful data from. If the performance really i= s cpu cycle/memory bandwidth limited, Intel's VTune tool is the best way I = know measure where the time goes. Jan -----Original Message----- From: xxxxx@lists.osr.com [mailto:bounce-644699-145174@lists= .osr.com] On Behalf Of xxxxx@gmail.com Sent: Tuesday, January 9, 2018 3:41 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: RE:[ntdev] How to increase throughput using IRP based winsock @Don Burn We are allocating IRP's for every send or receive request using IoAllocate= Irp and allocating WSK buffer using IoAllocateMdl with MmBuildMdlForNonPage= dPool option. once the request is completed freeing irps and wsk buffer. C= urrently we are not allocating pool irps. How many IRP's do you have in your pool? I had a customer with a similar c= omplaint, adding more IRP's fixed the problem.=20 --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=3Dnt= dev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and softwar= e drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.= osronline.com/page.cfm?name=3DListServer>
  Message 7 of 12  
10 Jan 18 06:19
davs shrus
xxxxxx@gmail.com
Join Date: 01 Mar 2013
Posts To This List: 10
How to increase throughput using IRP based winsock

@Jan Bottorff I am doing huge transfer, may be around 1gb data transferring. which around in one transfer sending 64kb data through socket. we are using single socket for read and write data, does it make any difference in case of multiple sockets? from wireshark logs, RTT(158ms for wreiting 64kb data) taken almost equal to the winsock IRP completion(158ms) there is not much difference. But transfer speeds are relatively very low. we are testing in 5ghz(ac) network.
  Message 8 of 12  
10 Jan 18 13:17
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11741
How to increase throughput using IRP based winsock

xxxxx@gmail.com wrote: > I am doing huge transfer, may be around 1gb data transferring. which around in one transfer sending 64kb data through socket. > > we are using single socket for read and write data, does it make any difference in case of multiple sockets? > > from wireshark logs, RTT(158ms for wreiting 64kb data) taken almost equal to the winsock IRP completion(158ms) there is not much difference. > > But transfer speeds are relatively very low. we are testing in 5ghz(ac) network. What to you mean by "very low," exactly?  As soon as you mention that you are testing a wifi network, alarm bells go off all over.  Wifi performance is heavily dependent on a hundred different environmental issues, like router location, antenna orientation, building composition, furniture location, RF interference, reflections, wall positions, and many others. The best focused tests in the real world are getting about 300Mbps from 802.11ac, which would be 40 MB/s, about the speed of USB 2.  Your gigabyte transfer would take 25 to 30 seconds.  What are you actually seeing? -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 9 of 12  
10 Jan 18 19:19
M M
xxxxxx@hotmail.com
Join Date: 21 Oct 2010
Posts To This List: 753
How to increase throughput using IRP based winsock

Are you saying that you send 64kb (KB?) of data on a socket connection and then wait for an ack from the other end before sending the next block? If so, your performance is doomed to be terrible for the same reason that many well known and understood TCP and UDP protocols are. The ?chatty? problem; or more appropriately the lack of sufficient pipelining of data on high bandwidth, high latency networks ? which nowadays includes most LANs as well as the traditional problem with WAN throughput. Many protocol specific workarounds have been implemented, but the best advise is to follow the original advice from the designers of the TCP protocol and imagine that there must be a certain ?window? of data in transit at all times. The size of such a window will depend on how much data there is to send naturally, but also on the ability of the remote host to process or buffer it (usually not a concern now a days), but more importantly on the bandwidth latency product of the _current_ network path ? which is of course subject to change without notice during the course of your communications I don?t know what a ?5ghz(ac) network? is, but 158ms for an IRP completion is an eternity unless it is synchronous and waiting for some remote response Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@lists.osr.com> Sent: Wednesday, January 10, 2018 6:19:10 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] How to increase throughput using IRP based winsock @Jan Bottorff I am doing huge transfer, may be around 1gb data transferring. which around in one transfer sending 64kb data through socket. we are using single socket for read and write data, does it make any difference in case of multiple sockets? from wireshark logs, RTT(158ms for wreiting 64kb data) taken almost equal to the winsock IRP completion(158ms) there is not much difference. But transfer speeds are relatively very low. we are testing in 5ghz(ac) network. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 10 of 12  
11 Jan 18 03:01
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11741
How to increase throughput using IRP based winsock

On Jan 10, 2018, at 4:19 PM, xxxxx@hotmail.com <xxxxx@lists.osr.com> wrote: > > I don???t know what a ???5ghz(ac) network??? is, Oh, I think you probably do. 802.11ac wifi has its channels in the 5GHz band. ??? Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --
  Message 11 of 12  
11 Jan 18 14:46
Chris Aseltine
xxxxxx@gmail.com
Join Date: 23 Sep 2006
Posts To This List: 1225
How to increase throughput using IRP based winsock

Tim Roberts wrote: > The best focused tests in the real world are getting about 300Mbps > from 802.11ac, which would be 40 MB/s, about the speed of USB 2. Glug glug glug...
  Message 12 of 12  
11 Jan 18 18:40
M M
xxxxxx@hotmail.com
Join Date: 21 Oct 2010
Posts To This List: 753
How to increase throughput using IRP based winsock

Ah yes, wireless fun! I just didn?t recognize that particular way of describing it. Again for the OP, over a high latency network, you will need a pipeline of some kind. All Wifi is high latency even when you test an EM dampened room with nothing but the test harness. Can we assume TCP? Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@lists.osr.com> Sent: Thursday, January 11, 2018 2:46:01 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] How to increase throughput using IRP based winsock Tim Roberts wrote: > The best focused tests in the real world are getting about 300Mbps > from 802.11ac, which would be 40 MB/s, about the speed of USB 2. Glug glug glug... --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 04:22.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license