RSS
 

Плохо ездит ? Проверь железо и почитай буквари!

06 Apr

Последнюю неделю боремся с рядом моментов у заказчиков, которые можно описать фразой “А у меня загрузка не поднимается больше X мбит/с”. Или – “вечером появляется 2% потерь при достижении порога в Y мбит/с”.

Результаты разбирательств прогнозируемы. Причины проблем у заказчиков:

  • перегрузка “роутера” на базе FreeBSD. Ресурсы кушает pf, не хватает буферов, прерывания  и т.п. Результат – потери, деградация качества канала.
  • промежуточное железо. Ставит заказчик ноутбук на интерфейс – все пучком. Включает свою инфраструктуру – чудеса. Причина – на трассе стоит свитч вендора “икс”, который почему-то не свитчит с необходимой производительностью.
  • false negative. Мерять канал пингом или mtr для получения объективных данных – неверно в корне. Тот-же iperf – тоже не особая панацея, мы ведь живем не в зоопарке, не в замкнутой экосистеме. Реальный Интернет – это нечто другое, нежели лаба с парой свитчей и роутеров.

Подробнее о последнем. Если хочется померять мегабиты – можно сходить на speedtest.net, конечно. Но этот сервис предназначен для ориентировочной проверки скорости для бродбенд-пользователей, скорости между компьютером клиента и сервером speedtest’а. Здесь возникает масса моментов – антивирус на компьютере пользователя, операционные системы и настройки ip-стэка на сервере и у клиента, загруженность тестового сервера (мы, кстати, свой kharkiv.speedtest.net перевели на nginx и получили 20-25% прироста в скорости! Только заменой вэб-сервера!). Далее помним о зависимости расстояния (читай – времени, т.к. есть свои естественные задержки в связи со скоростью света и привнесенные задержки на каналообразующем и маршрутизирующем оборудовании) и TCP Window Size. Подробнее см. отличный материал на Wikipedia. Как ни крути, 10Мбит/с получить единичным TCP-соединением с достаточно удаленного источника  (а именно поверх TCP ходят протоколы FTP и WWW – ведь именно скачкой/закачком обычно пытаются измерять) НЕВОЗМОЖНО в принципе.

То есть, если нужно померять более-менее реально, запускаем пару-тройку десятков закачек с разных серверов. Можно это сделать на FreeBSD с помощью fetch или curl:

# fetch -o /dev/null http://remote.server.tld/iso/big_DVD_image.iso
# curl -o /dev/null http://another.server.tld/iso/big_DVD_image.iso

Далее – о мнимых “потерях”. Запустим любимый в народе mtr на, допустим, yahoo.eu (извините, вырвалось :) ):

Мнимые потери в mtr

Видим “страшные потери” на каком-то хопе. Звоним своему провайдеру и начинаем его ругать. А причина проста – там (как и у нас, собственно) стоит Juniper с отличной конструкцией в конфигурационном файле, в разделе filter:

term icmp {
from {
protocol icmp;
icmp-type [ echo-request echo-reply unreachable time-exceeded ];
}
then {
policer small-bw-policer;
accept;
}

term trace-route {
from {
protocol udp;
destination-port 33434-33523;
}
then {
policer small-bw-policer;
accept;
}
}

…где small-bw-policer выглядит как:

policer small-bw-policer {
  if-exceeding {
    bandwidth-limit 128k;
    burst-size-limit 15k;
  }
  then discard;
}

Умеющим читать на английском вышеизложенные куски конфига понятны. Неумеющим читать – конфиг нам говорит, что если общее количество трафика icmp или udp (на диапазон портов), предназначенного маршрутизатору, будет больше 128К, трафик уничтожается, а mtr показывает “мнимые” потери.

А проверить по-настоящему просто:

# ping -s 1500 -q -c 100 yahoo.eu
PING yahoo.eu (68.180.206.184): 1500 data bytes
--- yahoo.eu ping statistics ---
100 packets transmitted, 100 packets received, 0% packet loss
round-trip min/avg/max/stddev = 217.482/220.701/224.686/2.490 ms

То есть для корректного результата мы делаем icmp-эхо-запросы на хост, который нам интересен и смотрим на результат. И тогда в ряде случаев не прийдется паниковать и звонить провайдеру с сообщением, что “все пропало”.

Вышеизложенным я не в коей мере не хочу сказать, что у нас все идеально, что во всем мире интернет работает, как часы. Даже с учетом достаточно высокой надежности, к которой мы стремимся, интернет сложен и зависим от каждого – причем не только от каждого оператора/провайдера, но и от конечного пользователя или подключенного в интернет устройства. На моей памяти за последние два месяца были две или три достаточно неприятные проблемы со связностью у наших аплинков, причем это были проблемы вне их зоны влияния. Из-за роста нагрузки мы переводим бэкбон на Extreme – каталисты близки к потолку по надежной производительности и иногда выдают чудеса, о которых как-нибудь в другой раз. Просто хотелось бы видеть грамотную диагностику проблем. И не забываем о модели OSI :)

 

Tags: ,

Leave a Reply

You must be logged in to post a comment.

  1. nucleo

    апреля 7, 2009 at 21:51

    Time to live exceeded in transit – такие вообще все могут уничтожаться, а в соответствующем хопе будет 100% потерь.

     
  2. hcg weight loss

    сентября 17, 2011 at 19:52

    Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

     
  3. Rochelle Park NJ oven repair

    ноября 5, 2011 at 14:38

    [...]Sites of interest we have a link to[...]……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

     
  4. cheap diapers

    ноября 8, 2011 at 16:06

    [...]Sites of interest we have a link to[...]……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

     
  5. window shutters

    ноября 10, 2011 at 05:10

    Recommend Blogrolls…..

    [...]Please refer to these websites for more associated info..[...]…

     
  6. online house plans

    ноября 10, 2011 at 14:49

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  7. Skin Pigmentation

    ноября 10, 2011 at 20:36

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  8. Drug And Alcohol Testing In The Workplace

    ноября 11, 2011 at 12:47

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  9. basement repair in Fort Mitchell KY

    ноября 11, 2011 at 16:56

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  10. krkurvfyy

    декабря 11, 2011 at 08:08

    photm…

    pbhswdnur qtulj mujdchh mlxn mufwetlxeuobryc…

     
  11. funny room

    декабря 13, 2011 at 16:44

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  12. st george acupuncture

    декабря 13, 2011 at 19:38

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  13. What is Tribulus , does tribulus work

    декабря 14, 2011 at 09:05

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  14. Lola Luna

    декабря 15, 2011 at 21:10

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

     
  15. Carrier Parts

    декабря 19, 2011 at 11:16

    You should check this out…

    [...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]……

     
  16. pkv wechsel

    декабря 28, 2011 at 02:42

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  17. money investment

    декабря 31, 2011 at 04:44

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

     
  18. reconquistar

    января 1, 2012 at 15:27

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

    [...]Here are some of the sites we recommend for our visitors[...]……

     
  19. ameristep blinds

    января 1, 2012 at 22:25

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  20. domain name

    января 2, 2012 at 21:47

    [...]Sites of interest we have a link to[...]……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

     
  21. private krankenversicherung im vergleich

    января 3, 2012 at 13:04

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  22. oynuvsvhd

    января 4, 2012 at 04:46

    txydd…

    wneclxcbn sbdqx lqlqfjc tsvh wfbxvkelaeomebf…

     
  23. affiliate programs

    января 4, 2012 at 14:37

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  24. google analytics

    января 4, 2012 at 21:00

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

    [...]Here are some of the sites we recommend for our visitors[...]……

     
  25. Dating Site Affiliate

    января 6, 2012 at 16:15

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  26. work injury solicitors

    января 11, 2012 at 17:45

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

     
  27. car storage South Windham CT

    января 15, 2012 at 03:50

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  28. målare täby

    января 18, 2012 at 22:51

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  29. NBA Free Picks

    января 20, 2012 at 21:32

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

    [...]Here are some of the sites we recommend for our visitors[...]……

     
  30. free porn videos

    января 30, 2012 at 08:53

    [...]The information mentioned in the article are some of the best available [...]……

    [...]below you’ll find the link to some sites that we think you should visit[...]……

     
  31. steel coffee cup

    февраля 3, 2012 at 12:27

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

     
  32. Nagorno-Karabakh

    февраля 4, 2012 at 12:34

    [...]the time to read or visit the content or sites we have linked to below the[...]……

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

     
  33. Diagnostic Medical Sonography

    февраля 8, 2012 at 20:29

    [...]always a big fan of linking to bloggers that I love but don’t get a lot of link love from[...]……

    [...]just beneath, are numerous totally not related sites to ours, however, they are surely worth going over[...]……

     
 

Switch to our mobile site