Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
Hi,

here is something odd. Ever since I upgraded to Lion, my internet speed (100 mbit pipe) seems to be much slower than before.

There is a speed test tool offered by my ISP (on their servers, so basically the same network) on which I hardly reach 50 mbit.

Now here is the odd part: If I reboot into Windows 7 (bootcamp), that very same speed test gives me the full 100 mbit from within Windows. So it must be something with Lion.

The slow down on Lion only seems to affect single connections (e.g. one HTTP download). When using multiple connections at the same time (like bittorrent), it goes all the way up to the 100 mbits.

Any ideas?

Thanks
Sascha
 

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
That article says the problem has been there from Tiger aka 10.4 making it an overall OS X problem, not a Lion one. That also makes it less likely that you fixed it, it might have just been a fluke on the other end of the connection. It is common to limit the bandwidth, they might have limited it to 50 instead of 100 Mbit. It also highly depends on the speed test you are doing. Most speed tests are highly unreliable. On speedtest.net it really depends on what server you get. The nearest server gives my the most crappy speeds whilst a server a bit further away gives me a much better result (and I believe a more realistic one too).
 

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
That article says the problem has been there from Tiger aka 10.4 making it an overall OS X problem, not a Lion one. That also makes it less likely that you fixed it, it might have just been a fluke on the other end of the connection. It is common to limit the bandwidth, they might have limited it to 50 instead of 100 Mbit. It also highly depends on the speed test you are doing. Most speed tests are highly unreliable. On speedtest.net it really depends on what server you get. The nearest server gives my the most crappy speeds whilst a server a bit further away gives me a much better result (and I believe a more realistic one too).

Dude, have you even read what I wrote? Clearly not.

1.) I fixed it. With the help of that article.

2.) I haven't used any limiting speed tests, I have used the one provided by my ISP. They use it as a support utility and it is clearly not limited. In fact, if you call them to complain about speed issues, first thing they do is point you to that very speed test. They wouldn't do that if they had limited it, would they? Think.

3.) Most importantly: When I tried the same speed test utility from my ISP using Windows 7 instead of Mac OS X (same day time, two minutes after the test with Mac OS) I got the full 100 mbit. Two minutes later I try again with Mac OS, I get 50 mbit. This had a clear pattern and was reproducible.

4.) I tweaked the TCP parameters as described in that article and the speed test *immediately* went up to 100 mbit. A clear indicator that whatever was set before, was less than optimal.

Also, I never said this would be a isolated Lion problem. All I said was that this happened after I upgraded from 10.6 to 10.7. I did not have this problem with 10.6.

----------

934Mbit/s on my gigabit ethernet home network after doing this!

I never had problems on my local network. I am using iSCSI storage all the time with full 1 gbit speed with no problems. The problem I described only affected connections that traversed a router, e.g. my internet connection.
 

johnhurley

macrumors 6502a
Aug 29, 2011
777
56
Dude, have you even read what I wrote? Clearly not.

1.) I fixed it. With the help of that article.

Can you please do a cat on your /etc/sysctl.conf and post the results?

Did you have anything in it before making the mod?
 

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
Can you please do a cat on your /etc/sysctl.conf and post the results?

Did you have anything in it before making the mod?

sysctl.conf was empty before doing this. I figure it just uses the BSD default values unless you change them. Here is what my sysctl.conf looks like now:

Code:
net.inet.tcp.delayed_ack=1
kern.maxnbuf=60000
kern.maxvnodes=280000
net.inet.tcp.sendspace=2097152
net.inet.tcp.recvspace=2097152
net.inet.tcp.maxseg_unacked=32

Note that I had to play around with the delayed_ack setting. Using different values here had dramatic effects on throughput and the value might have to be set differently on other machines.

Also, the delayed_ack alone did not do anything. Only in combination with send and receive space did I manage to get it working.

----------

How about posting exactly what you did to fix it, rather than posting an arcane link to an article.

Why is that link arcance? It's the internet. Why should I re-write here what's been written there?

Basically I used the sysctl command in terminal to tweak some TCP settings (see above). Once I got them right, I put them in /etc/sysctl.conf to make them stick.
 

johnhurley

macrumors 6502a
Aug 29, 2011
777
56
sysctl.conf was empty before doing this. I figure it just uses the BSD default values unless you change them. Here is what my sysctl.conf looks like now:

Code:
net.inet.tcp.delayed_ack=1
kern.maxnbuf=60000
kern.maxvnodes=280000
net.inet.tcp.sendspace=2097152
net.inet.tcp.recvspace=2097152
net.inet.tcp.maxseg_unacked=32

Thanks I am just starting to think about this area. New to apple's ... been supporting systems on solaris/linux for a long time.

I have never seen a linux system with an empty ( nonexistent ) sysctl.conf so was pretty surprised to find I have no such file on my new macbook air 2011.
 

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
Thanks I am just starting to think about this area. New to apple's ... been supporting systems on solaris/linux for a long time.

I have never seen a linux system with an empty ( nonexistent ) sysctl.conf so was pretty surprised to find I have no such file on my new macbook air 2011.

Yeah well actually OS X is based on a BSD variant (FreeBSD I believe). And Apple have changed A LOT. I think the TCP stack comes with a set of defaults that it uses when sysctl.conf is absent.

That being said... People should only change this stuff in case there are problems. I just posted this so maybe someone who's in the same boat has a hint.

Cheers
 

shadyMedia

macrumors newbie
Apr 6, 2009
27
0
Dude, have you even read what I wrote? Clearly not.

1.) I fixed it. With the help of that article.

2.) I haven't used any limiting speed tests, I have used the one provided by my ISP. They use it as a support utility and it is clearly not limited. In fact, if you call them to complain about speed issues, first thing they do is point you to that very speed test. They wouldn't do that if they had limited it, would they? Think.

3.) Most importantly: When I tried the same speed test utility from my ISP using Windows 7 instead of Mac OS X (same day time, two minutes after the test with Mac OS) I got the full 100 mbit. Two minutes later I try again with Mac OS, I get 50 mbit. This had a clear pattern and was reproducible.

4.) I tweaked the TCP parameters as described in that article and the speed test *immediately* went up to 100 mbit. A clear indicator that whatever was set before, was less than optimal.

Also, I never said this would be a isolated Lion problem. All I said was that this happened after I upgraded from 10.6 to 10.7. I did not have this problem with 10.6.

----------



I never had problems on my local network. I am using iSCSI storage all the time with full 1 gbit speed with no problems. The problem I described only affected connections that traversed a router, e.g. my internet connection.

Wow I always find it funny when people need to respond in such a dick way on forums. Maybe the guy just didn't understand what you wrote firstly. When ever I see replies like that and I know I can help the person out I always ignore it and I know there's other people that do the same. just saying lol
 

phyrexia

macrumors 6502a
Sep 3, 2010
612
3
I never had problems on my local network. I am using iSCSI storage all the time with full 1 gbit speed with no problems. The problem I described only affected connections that traversed a router, e.g. my internet connection.

The link you posted discusses problems with AFP and SMB, which are only used in LANs.

The people in the thread you posted a link to are high fiving each other about their home network speed. The use of iperf in a LAN is demonstrated.

:confused:
 

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
The link you posted discusses problems with AFP and SMB, which are only used in LANs.

The people in the thread you posted a link to are high fiving each other about their home network speed. The use of iperf in a LAN is demonstrated.

:confused:

That's right, they discussed filesharing protocols on the local network. They all use TCP though and the tweaked parameters in sysctl.conf are for TCP, nor for filesharing protocols. Anything that uses TCP benefits from these tweaks.

Note however: If it ain't broke, don't fix it. If you don't have any networking speed issues on your system, you don't need this.
 

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
Dude, have you even read what I wrote? Clearly not.

1.) I fixed it. With the help of that article.
I have read what you wrote but I can't say that you've read what I wrote nor the article you used. Read both again and try to comprehend what both say. From the information from you and that article I can't tell that it was a Lion/OS X upgrade problem and you actually fixed it. It might be the case but I can't tell for sure.

2.) I haven't used any limiting speed tests, I have used the one provided by my ISP. They use it as a support utility and it is clearly not limited. In fact, if you call them to complain about speed issues, first thing they do is point you to that very speed test. They wouldn't do that if they had limited it, would they? Think.
Yes please think before you do something. You make a very common mistake beginners that have no idea what they are doing make: they trust tests from 3rd parties like their ISP. If there is 1 kind of test you should never ever trust are speedtests, especially when they are from your ISP! What do you think what happens when that test shows the reality, that people are not able to get the full speed of what the ISP says they offer? It is in the ISP's best interest to not display the actual speed but a far more positive one. If you do multiple speedtests from various 3rd parties and tools you'll see the difference. So yes, please think about what you are doing and try to comprehend how things work.

But, if you have actually read my reply you'd have known I was talking about the technical part, not about the marketing part. That means I was talking about technical issues where some servers are slower than others. One of those things are the network links: their speed AND their LOAD (!!!!). If lots of people are connecting to that server and it can't keep up you will get slower speeds. It is like a bicycle: when you ride alone you can go very fast. Carry somebody and you won't be riding as fast. Same thing for other kind of vehicles.

If you would have actually read my reply you'd also have known that I was talking about limiting your connections bandwidth and NOT the speedtest. This is common networking (see, it helps if you actually know what you are doing instead of copy-pasting stuff). ISP's offer different subscriptions with different bandwidths. When using something like fibre connections they run standard fibre cables that have a bandwidth of 10 Gbps. They won't give you that though. Instead they will limit the bandwidth to whatever is in your contract. Sometimes they screw up (I've seen it happen quite often) and people get stuck on a lower speed. If something is limited to a fixed speed of say, 50 Mbps it should ring some bells. In case of problems it is less likely that you'll see such a limitation, it is more likely that it will fluctuate. To give you an example: the Dutch ISP KPN offers fibre connections (ftth). You get internet (very fast ones), tv/radio and telephony. What they do is put separate VLANs on your connection: 1 for tv/radio, 1 for telephony and 1 for the standard internet connection. They do this because they can limit the bandwidth per VLAN. This way your internetconnection, telephony and radio/tv do not interfere. This means you can watch an HD movie, download like there is no tomorrow and make normal phone calls. They also offer these services on their DSL connections. They can't do it there and it causes problems when you try to do all these things. One of the reasons why most people on DSL will be limited to SD.

3.) Most importantly: When I tried the same speed test utility from my ISP using Windows 7 instead of Mac OS X (same day time, two minutes after the test with Mac OS) I got the full 100 mbit. Two minutes later I try again with Mac OS, I get 50 mbit. This had a clear pattern and was reproducible.
It is very common that these kind of tests have fluctuating results. You need to take quite a lot of tests and from different parties to have some kind of certainty.

4.) I tweaked the TCP parameters as described in that article and the speed test *immediately* went up to 100 mbit. A clear indicator that whatever was set before, was less than optimal.
Or the ISP fixed something or the load in the server was less or the load on the network between you and the server was less or... There are way too many variables that can explain why it is now fixed. You should have used various tests, not just 1. By using more than 1 you minimise this risk of problems.

Also, I never said this would be a isolated Lion problem. All I said was that this happened after I upgraded from 10.6 to 10.7. I did not have this problem with 10.6.
Just wanted to point out that this isn't a 10.7 problem but simply an OS X problem. 10.6 has the same kind of problem. The fact that you used 1 test is the big problem. If something is wrong with that test it will affect the results. If it spits out wrong results you come to wrong conclusions.

I never had problems on my local network. I am using iSCSI storage all the time with full 1 gbit speed with no problems. The problem I described only affected connections that traversed a router, e.g. my internet connection.
The more reason to doubt that you actually fixed it by using those settings.
 

funkahdafi

Suspended
Original poster
Mar 16, 2009
377
112
Planet Earth
Dyn, I really don't like it if people try to tell me I am a beginner and that I don't understand what I am talking about. YOU are clearly not reading what I say and all you are doing here is trying to prove that you are right and other people are not.

I've had a professional career in IT since 1993. I earn my daily living as a network engineer, designing and architecting large scale enterprise and carrier networks. I breathe TCP/IP and I eat network equipment for breakfast. I actually do know exactly what I am doing in this field and I know exactly when I see a problem and what's the root cause for that. So don't lecture me with your ignorant ********.

Read the next two sentences very carefully, because they are all that count in this "discussion". And then keep on embarrassing yourself if you want.

I had reproducible network performance issues. I applied the forementioned TCP parameters with sysctl and the problems went away.
 

Vulkan

macrumors 6502
Apr 16, 2005
349
139
Useless, TX
Does anybody knows if these settings work under Yosemite 10.10:

Code:
net.inet.tcp.delayed_ack=1
kern.maxnbuf=60000
kern.maxvnodes=280000
net.inet.tcp.sendspace=2097152
net.inet.tcp.recvspace=2097152
net.inet.tcp.maxseg_unacked=32
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.