[ofw] winverbs ND provider

Tzachi Dar tzachid at mellanox.co.il
Wed Jan 13 09:48:51 PST 2010


Just making sure, we are talking about 2008 64 bits right?


As for  QueryPerformanceCounter():

I have run a simple test routine and I get 1.2 us which is outrageous in
itself but still very far from your numbers.

Can you please run the following function and send us the result?

void TestQueryPerformanceCounter()
{
    const int tries=1000000;
    DWORD dwStart = GetTickCount();
    for(int i=0;i<tries;i++) {

        LARGE_INTEGER	tick_count;
        QueryPerformanceCounter( &tick_count );
    }
    printf("QueryPerformanceCounter took %f micro seconds\n",
(GetTickCount() - dwStart) * 1000.0 / tries);
}

As for the ibat resolve:

I have created a very simple "resolve" program and started playing with
it.
Without any change resolve takes ~33us

I have changed the resolve code to open the ibat device once and than
only do the resolve many times this took ~27us. I guess that the nd code
can do a similar thing.

As for the socket, bind, getsockname: sequence:
I have created a simple test that does this:

    for(int i =0; i < tries; i ++) {


        SOCKET s;
        s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
        if (s == INVALID_SOCKET) {
        	printf("socket error\n");
        }

        hr = bind(s, (sockaddr *)&SrcAddr, sizeof DestAddr);
        if (FAILED(hr)) {
        	printf("bind error\n");
        }

        int len = sizeof DestAddr;
        hr = getsockname(s, (sockaddr *) &DestAddr, &len);
        if (FAILED(hr)) {
        	printf("getsockname error\n");
        }
        closesocket(s);
    }
and this only take me ~22us to complete which is very far from the
numbers that you have measured  (socket: 75 us, bind: 32 us
getsockname: 9 us).

By the way, the entire socket thing doesn't really look like a must to
me. If we want to create a "unique numbers generator" we can defently
make something much more efficient. Does the socket / bind getsockname
has another reason?



On the other hand I have been running the ndconn program and it seems
that I only get 1260 connections per second, which is very close to the
numbers that you are getting.

I have also noticed that when running I get the following error:
[AL]:kal_cep_get_context() !ERROR!: CEP callback mismatch for cid 2326,
h_al FFFFFA802529A010




I'll continue to look at things tomorrow in order to try and understand
what else can be done.

Thanks
Tzachi


> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Wednesday, January 13, 2010 2:12 AM
> To: ofw_list
> Subject: Re: [ofw] winverbs ND provider
> 
> >I'll try to measure the socket calls used by winverbs to see 
> how much 
> >time is spent there.  That's really the only significant 
> piece of code 
> >I can see.
> 
> Here's some timing measurements for calls to 
> winverbs:BindAddress(), which is invoked when creating a 
> listen and connect.  This is for a single connection.
> 
> listen side:
> translate address: 62 us
> socket: 844 us
> socket bind: 34 us
> getsockname: 8 us
> winverbs bind ioctl: 19 us
> 
> connect side:
> translate address: 73 us
> socket: 75 us
> socket bind: 32 us
> getsockname: 9 us
> winverbs bind ioctl: 17 us
> QueryPerformanceCounter: roughly 10,000 us - egads
> 
> I don't know why the server socket call takes so much longer, 
> but the results are consistent.  I'm guessing it's related to 
> something internal to winsock initialization.  In total, 
> BindAddress can be called about 4800 times per second.  I 
> will try to break the times down more and group them some.  
> The poor performance of QueryPerformanceCounter makes 
> collecting accurate data at multiple levels difficult though.
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list