martes, 27 de enero de 2015

More tests on Wifi OS X problems

I go on investigating the issues with Wifi communications on OS X Yosemite 10.10.2 (14C106a).
[ This is my third post on this subject: previous post 1 | 2 ]
I was wondering if it's related specifically to the Wifi Interface or not:

So, I activated Apache HTTPD server and then I run Apache Bench with a concurrency of 100.

# ab -c 100 -n 100000 http://localhost/


With the URL http://localhost I'm using the IP 127.0.0.1, so the connection is
from: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128 
inet 127.0.0.1 netmask 0xff000000 
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
nd6 options=1<PERFORMNUD>

to: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128 
inet 127.0.0.1 netmask 0xff000000 
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
nd6 options=1<PERFORMNUD>
This way, Wifi was not involved in the testing. With Apache Bench I can add 100 new connections to the stack. Nevertheless, my check script go on without any changes. Conclusion: it's not a general TCP/IP stack problem but specific for WiFi.

The same test using the IP of the WiFi got interrupted:

MacBook-Air:private root# ab -c 100 -n 100000 http://192.168.0.13/
This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.0.13 (be patient)
Completed 10000 requests
apr_socket_recv: Connection refused (61)

Total of 16447 requests completed

So, there is something here...
Nevertheless, if I change the concurrency into 50, Apache Bench is working well, and the check connection script is doing well too:
---
HTTP OK: HTTP/1.1 200 OK - 19222 bytes in 0,225 second response time |time=0,225253s;;;0,000000 size=19222B;;;0
DNS OK: 0,118 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,117735s;;;0,000000
      57
HTTP OK: HTTP/1.1 200 OK - 19222 bytes in 0,225 second response time |time=0,225253s;;;0,000000 size=19222B;;;0
DNS OK: 0,105 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,104543s;;;0,000000
      57
HTTP OK: HTTP/1.1 200 OK - 19205 bytes in 0,234 second response time |time=0,234407s;;;0,000000 size=19205B;;;0

DNS OK: 0,064 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,063649s;;;0,000000
---
So it seems not to affect if Wireless is not used (well, if packets aren't going over the air).

I think I'm going to test if it's something related to the Router part of the Wifi Access Point or it affects the Layer-2 too. I'll install an apache2 httpd server in the same Wifi LAN and I'll do the same tests.