[phpBB Debug] PHP Notice: in file /viewtopic.php on line 945: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 945: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead
BREN forums • View topic - perfSONAR-BUOY, bwctld

perfSONAR-BUOY, bwctld

Cacti, Smokeping, Nagios, Zabbix, perfSONAR и т.н.

perfSONAR-BUOY, bwctld

Postby atanas » 02 Jul 2009, 19:28

С този пост ми се иска да подканя ентусиастите и новаторите да се включат в една инициатива по подкарване на bwctl, което пък е свързано с дейност по GÉANT по която работи Нина. Освен това инсталирането на bwctl на ключови места в мрежата би ни помагало и за по-гъвкави измервания на "maximum TCP bandwidth" с инструменти като iperf, thrulay или nuttcp.

За тези от вас, които се вдъхновяват от идеята ето какво направих на Debian Linux за подкарването на bwctl.


(1) Инсталирах си iperf, който е задължителен за по-нататъшната ни работа по perfSONAR-BUOY
Code: Select all
aptitude install iperf


(2) Инсталира се и ntp (задължително ntp, не например openntpd)
Code: Select all
aptitude install ntp

Предлагам ви в /etc/ntp.conf да зададете само един сървър за синхронизация: server time.acad.bg, а останалите ги махнах. Вижте си и останалите опции във файла. После рестартирах.
Code: Select all
/etc/init.d/ntp restart


(3) Версията на bwctl трябва да е най-малко 1.3 и нея можете да я намерите оттук. Аз ползвах bwctl-1.3.tar.gz.


(4) В процеса на работа/тестване се оказа, че трябва да се приложи patch (за Debian) и американците ми предложиха това, с което нещата тръгнаха (преди това не искаше да работи с iperf). Не е изключено да има нужда от patch и за други ОС, но засега не съм тествал. Ето стъпките, които изпълних:
Code: Select all
wget http://e2epi.internet2.edu/bwctl/download/bwctl-1.3.tar.gz
tar xvfz bwctl-1.3.tar.gz
cd bwctl-1.3
wget http://packrat.internet2.edu/~aaron/bwctl_debian.patch
patch -i bwctl_debian.patch -p0
./configure (вижте си опциите за всеки случай)
make
make install
cp ./conf/bwctld.sh /etc/init.d/bwctld
cp ./conf/bwctld.conf /usr/local/etc/
cp ./conf/bwctld.limits /usr/local/etc/

след това корегирах /usr/local/etc/bwctld.conf с пълния път до iperf: iperf_cmd /usr/bin/iperf, както и iperf_port 5001-5005, както и user и group, но не ползвайте root!! В /etc/init.d/bwctld промених само PREFIX=/usr/local.


(5) След това пуснах bwctld така:
Code: Select all
/etc/init.d/bwctld start

ако всичко е наред отговора е това:
bwctld[31023]: FILE=policy.c, LINE=473, WARNING: regular: Using parents more restrictive limits for duration.
bwctld[31023]: FILE=nuttcp.c, LINE=114, NuttcpAvailable(): nuttcp_cmd unset, using "nuttcp"
bwctld[31023]: FILE=nuttcp.c, LINE=220, NuttcpAvailable(): We were unable to verify that nuttcp is working. Likely you do not have it installed. exit status: 1: output: exec(nuttcp): No such file or directory
bwctld[31023]: FILE=tools.c, LINE=296, Couldn't initialize tool "nuttcp". Disabling it.
/etc/init.d/bwctld start: bwctld started

Code: Select all
netstat -tapn | grep bwctld

tcp6 0 0 :::4823 :::* LISTEN 11785/bwctld

не забравяйте да направите корекции във firewall ако е нужно. Ако ntp сървъра ви не е синхронизиран:
bwctld[9512]: FILE=time.c, LINE=171, NTP: Status UNSYNC (clock offset problems likely)

изчакайте и/или си ревизирайте също firewall


(6) Приятни тестове на линията, например:
Code: Select all
bwctl -c ek1.uni-plovdiv.bg

и резултата
bwctl: Using tool: iperf
bwctl: 15 seconds until test results available

RECEIVER START
bwctl: exec_line: /usr/bin/iperf -B 217.10.243.164 -s -f b -m -p 5004 -t 10
bwctl: start_tool: 3455543458.423358
------------------------------------------------------------
Server listening on TCP port 5004
Binding to local address 217.10.243.164
TCP window size: 87380 Byte (default)
------------------------------------------------------------
[ 15] local 217.10.243.164 port 5004 connected with 194.141.0.7 port 5004
[ 15] 0.0-11.7 sec 2105344 Bytes 1437755 bits/sec
[ 15] MSS size 1448 bytes (MTU 1500 bytes, ethernet)
bwctl: stop_exec: 3455543472.487095

RECEIVER END


В момента bwctld върви на:
uran.acad.bg в ИПОИ, БАН
194.141.27.181 - гранична машина в ПУ (между ПУ и ТУ)
ek1.uni-plovdiv.bg - това е машина в ПУ към мрежата на Евроком

За допълнително инфо прегледайте:
perfSONAR-BUOY-install[1].ppt
Installation_Actions_Specification.doc
http://www.perfsonar.net/download/services
http://anonsvn.internet2.edu/svn/perfSO ... ervice/pSB


Този пост посвещавам на Лъчо :Rose:
AE51 2A62 FCBE 5E15 C19F 56CD ECC5 2186 0455 9912
User avatar
atanas
Global Moderator
 
Posts: 191
Joined: 17 Feb 2009, 00:34
Location: Plovdiv

Re: perfSONAR-BUOY, bwctld

Postby atanas » 03 Jul 2009, 09:27

atanas wrote:Предлагам ви в /etc/ntp.conf да зададете само един сървър за синхронизация: server time.acad.bg, а останалите ги махнах. Вижте си и останалите опции във файла. После рестартирах.
Code: Select all
/etc/init.d/ntp restart



Корекция: Трябва да е 194.141.0.1 вместо time.acad.bg ако хоста на който се тества bwctld е IPv6 enabled.
Засега на 2001:4b58:acad::11 (time.acad.bg) няма слушащ ntp daemon.
AE51 2A62 FCBE 5E15 C19F 56CD ECC5 2186 0455 9912
User avatar
atanas
Global Moderator
 
Posts: 191
Joined: 17 Feb 2009, 00:34
Location: Plovdiv

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 09:51

atanas wrote:Този пост посвещавам на Лъчо :Rose:

:oops: :roll: :-)
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 09:53

atanas wrote:Корекция: Трябва да е 194.141.0.1 вместо time.acad.bg ако хоста на който се тества bwctld е IPv6 enabled.
Засега на 2001:4b58:acad::11 (time.acad.bg) няма слушащ ntp daemon.

Мда, така е. Работи се по тоя въпрос (както беше станало дума още преди доста време)... Ама то по колко ли вече въпроса не се работи, та затова не искам да обещавам никакви срокове... :%)
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 09:56

atanas wrote:За тези от вас, които се вдъхновяват от идеята ето какво направих на Debian Linux за подкарването на bwctl.

Снощи Алекс веднага ми писа, че се е вдъхновил, и ще пробва да го подкара под CentOS и Gentoo, а после ще сподели опита си. :)
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 11:38

ognyan wrote:Явно има някакъв проблем с пакета на iperf в Gentoo, защото при работа със зададен интерал на извеждане на междинните резултати, програмата зацикля и започва да плюе неверни времеви стойности. Така или иначе при ръчно компилиране няма проблем.

Може би Алекс може да каже нещо по въпроса, след като и той експериментира с Gentoo...

ognyan wrote:Колкото до bwctl също мина ОК инсталацията, но ntp сървъра не беше се синхронизирал и това доста го притеснява. Може би ще трябва да се търси вариянт без такъв, все пак синхронизацията може да отнеме време, а това е livecd.

Наско също имаше проблем със синхронизацията. За съжаление, тя е ключова за тестовете, и мисля, че няма как да се заобиколи. Но Наско реши проблема по някакъв начин, и предполагам ще сподели...
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Re: perfSONAR-BUOY, bwctld

Postby spasov » 03 Jul 2009, 11:39

Като за начало ми се струва уместно, някой да направи опит за рисунка на функционална схема с архитектура на начина на тестване. сървър-клиент, управляващ сървър и т.н.
...
(или понеже гледам, че вече сте се впуснали в технически детайли, то поне успоредно с това да се направи и подобна схема)

Поздрави,
Станислав
spasov
Administrator
 
Posts: 36
Joined: 16 Feb 2009, 20:41

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 12:01

spasov wrote:Като за начало ми се струва уместно, някой да направи опит за рисунка на функционална схема с архитектура на начина на тестване. сървър-клиент, управляващ сървър и т.н.


BWCTL Architecture

Components Overview

In the general case, BWCTL works by having a bwctld process on each of the endpoint test systems. The bwctl client contacts each of those daemons and requests a test. That request includes an indication of the desired time period as well as a full parameterization of the desired Iperf, Nuttcp or Thrulay test. bwctld is responsible for implementing the policy and scheduling constraints.

General Case

Image

bwctld has been developed as a classic accept/fork daemon. The master daemon process listens for new network connections and also manages the resources for all child bwctld processes. Once a connection comes in, bwctld forks a child process to handle that request. The child process deals with all encryption and communication issues with the client, as well as dealing with all static resource limits. Static resource limits are those not dependent upon what is currently happening on the node. For example, the request broker can easily determine if the given client is allowed to do UDP tests without talking to the master daemon. Once the request broker process determines the request is valid, it makes a request to the master daemon for the resources and time period requested by the client. If the master daemon has the resources available (including the open time period), it grants the request.

Scheduling Requests

The time period for the test is always requested by the client. It makes a request to the request broker process on each endpoint of the test in turn. The time period is requested by specifying two timestamps. The earliest time and the latest time the client is willing to settle for. The request broker either returns a tentative reservation with the first open time that will fulfill the parameters of the test or a request denied message. The client can then use the tentative reservation time as the earliest time in the request to the request broker on the other host. Eventually, an agreed upon time will be reached or the latest time will be reached. If the request broker can not fulfill the request before the latest time specified in the request, it will return a server too busy message. If the client gets the same time from both servers, it must then confirm the reservation with a start session message. The start session message must be received before a configurable timeout period and before the reservation time, or the server will disallow the reservation.

Scheduling Algorithm

The bwctld parent resource broker process holds the master schedule. When requests come in from clients, the request broker process does the non-global authorization checks and then passes the global authorization checks up to the resource broker including the request for a given time slot. The scheduling itself is simply a first-fit algorithm with limits imposed on how far it is willing to schedule into the future.

Each time slot that is requested is padded to allow for time synchronization issues. The algorithm for the padding is dynamic and depends upon the following factors:

  • L (local)
    accuracy of the local clock as reported by NTP and the local sync_fuzz parameter setting
  • P (peer)
    accuracy of the peer clock as reported by NTP and the peer sync_fuzz parameter setting
  • R (round trip time)
    Round Trip Time between the local host and the peer

The algorithm is:

A + L + P + (2 * R)

Where A is a small constant. (Currently, one second in the code.)

This amount of time is padded before and after each time slot that is requested. The algorithm was designed to continue to work in the case when the test peer is not as well synchronized and is perhaps halfway around the globe.

The padding is placed before and after the test slot because there is 2 RTT of communication before and after each test. For well synchronized hosts that are fairly near one another, this algorithm usually provides 2-3 seconds of padding between each test (time slot). This could potentially be reduced by making the A constant smaller. That constant represents the amount of time it takes a host to context switch, start processes, and includes how quickly the throughput tester notices that its time is up. Experimentation has shown that even with 1 second of padding, the throughput testers sometimes need to be killed off.

Test Execution

Once the client sends the the start session message, the request broker forks off a peer agent that is responsible for verifying the time offset to the other endpoint of the test and initializing the communication socket that will be used to trade results of the test.

If the test endpoint systems have a reasonably close idea of the time, and they can communicate, the peer agent forks off the test process. The test process waits until the scheduled start time and then executes the desired throughput tester with the correct command line parameters. Note: Experience is showing that a closer integration with the testing process (Iperf, Nuttcp or Thrulay) may be needed in the future.

End User Workstation Configuration

In the event that the local host is one of the endpoints and there is no local bwctld running, bwctl will spawn additional processes to execute the local side of the test directly. In this case, a diagram of the processes involved would look like the following:

Local bwctld not available
Image

The same basic communication takes place between the different processes in this alignment. The main difference is that the client has no need of a resource broker. This is the expected usage scenario for end user workstations to run tests to well defined BWCTL measurement beacons.

* The images above shows a dashed blue line around the processes that occur on each host.

Ref: http://www.internet2.edu/performance/bw ... cture.html

Edit (2009-07-20): Internet2 имат нов сайт. Линковете са актуализирани.
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Re: perfSONAR-BUOY, bwctld

Postby spasov » 03 Jul 2009, 13:03

Браво, Лъчо, много бързо ги нарисува схемите! ;)
spasov
Administrator
 
Posts: 36
Joined: 16 Feb 2009, 20:41

Re: perfSONAR-BUOY, bwctld

Postby iliev » 03 Jul 2009, 13:13

spasov wrote:Браво, Лъчо, много бързо ги нарисува схемите! ;)

Шшшшшт, да не чуят отвъд океана, че ще стане лошо! :evil:
Luchesar V. ILIEV
User avatar
iliev
 
Posts: 506
Joined: 16 Feb 2009, 20:10
Location: Sofia, Bulgaria

Next

Return to Системи за наблюдение и контрол

Who is online

Users browsing this forum: No registered users and 1 guest

cron