La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

Griglie ComputazionaliFile Transfer in Grids1 INFN – CNAF Corso di Laurea specialistica in Informatica Anno Acc. 2004/2005.

Presentazioni simili


Presentazione sul tema: "Griglie ComputazionaliFile Transfer in Grids1 INFN – CNAF Corso di Laurea specialistica in Informatica Anno Acc. 2004/2005."— Transcript della presentazione:

1 Griglie ComputazionaliFile Transfer in Grids1 Tiziana.Ferrari@cnaf.infn.it INFN – CNAF Corso di Laurea specialistica in Informatica Anno Acc. 2004/2005

2 Griglie ComputazionaliFile Transfer in Grids2 Outline PART I: Transport Control Protocol (TCP) PART II: TCP: Controllo e prevenzione della congestione PART III: FTP PART IV: GridFTP References

3 Griglie ComputazionaliFile Transfer in Grids3 PART I Transport Control Protocol

4 Griglie ComputazionaliFile Transfer in Grids4 Caratteristiche generali Viene creata una connessione virtuale tra mittente e destinatario attraverso lo scambio di informazioni di controllo (fase di call set- up). La creazione della connessione è seguita dalla fase di trasferimento dati vera e propria. Durante la trasmissione il protocollo TCP continua a scambiare informazioni di controllo. La connessione e di tipo bidirezionale: una direzione viene utilizzata per scambiare i byte di informazione utile (mittente destinatario), mentre la direzione opposta viene utilizzata per lo scambio di informazione di controllo (destinatario sorgente) Per le applicazioni di natura interattiva in cui deve essere minimizzato il ritardo di ricezione delle unità di dato (e.g. telnet), viene forzato linvio di pacchetti non appena è disponibile qualche byte di informazione (meccanismo di data push)

5 Griglie ComputazionaliFile Transfer in Grids5 Send e receive buffer Si dice buffer unarea della memoria dellapplicazione che contiene i dati da scambiare tra mittente e destinatario. I dati vengono mano mano copiati - in unità di memoria di dimensione configurabile da parte di una applicazione - nellarea di memoria del sistema operativo attraverso la system call write(). Per ottimizzare il rapporto tra le informazioni di controllo poste nellintestazione e la quantità di byte di dati disponibili nellarea data, un dato messaggio vene inviato soltanto nel momento in cui la parte di dati disponibile nel buffer eccede una data soglia configurabile. Send buffer: area di memoria in cui TCP pone i messaggi in attesa di trasmissione; il send buffer è anche detto send socket buffer. Receive buffer: area di memoria del sistema operativo in cui TCP pone i messaggi ricevuti; il receive buffer è anche detto receive socket buffer Per ogni nuova connessione vengono allocati una nuova coppia di send e receive buffer

6 Griglie ComputazionaliFile Transfer in Grids6 Send e receive buffer (cont) dati Applicazione 1 Applicazione n... Connessione 1 Connessione n SEND SOCKET RECEIVE SOCKET write() AREE DI MEMORIA DELLE APPLICAZIONI AREA DI MEMORIA DELLE SISTEMA OPERATIVO

7 Griglie ComputazionaliFile Transfer in Grids7 Segmento Viene definita segmento la parte dati di una unita di trasmissione del protocollo TCP. Viene definito messaggio lunione del segmento e dellintestazione TCP. La dimensione massima di un segmento e pari alla dimensione massima del pacchetto IP, esclusi i byte dellintestazione TCP e IP. Essa viene definita Maximum Segment Size (MSS): MSS = MTU – sizeof(TCP header) – sizeof(IP header) Intestazione TCP dati SEGMENTO TCP MESSAGGIO TCP

8 Griglie ComputazionaliFile Transfer in Grids8 Intestazione TCP: formato Source port Destination port Sequence number Acknowledgement number OffsetReserved CodeWindow ChecksumUrgent pointer OptionsPadding Data... 081631 Source/destination port: identificazione dellapplicazione mittente/ricevente attive rispettivamente sul nodo mittente IP_source e nodo destinatario IP_dest Sequence number: numero di sequenza del primo byte del campo Data nellambito del flusso di byte generati dalla sorgente (ne identifica la posizione) Acknowledgement number: numero di sequenza del primo byte di dati atteso. Tale numero corrisponre al numero di sequenza successivo al numero di sequenza dellultimo segmento correttamente ricevuto. Il numero di sequenza si riferisce al flusso generato nel senso opposto del traffico (gli ackknowledgement sono generati sempre dal ricevente di un dato stream e quindi viaggiano nel senso inverso del flusso dati).

9 Griglie ComputazionaliFile Transfer in Grids9 Intestazione TCP: formato (cont) Offset: indica la dimensione della porzione Data del segmento TCP Reserved: campo non specificato, riservato ad usi futuri Code: codice che identifica la funzione del segmento (e.g. Segmento di apertura di una connession: SYN, segmento di chiusura: FIN, segmento dati, segmento che include esclusivamente informazione di acknowledgement URG: urgent pointer set, il segmento non è soggetto a buffering al lato ricevente ACK: campo ACK valido PUSH: il segmento non è soggetto a buffering al lato mittente RST: reset della connessione SYN: synchronize sequence numbers FIN: il mittente ha raggiunto la fine del byte stream generato dalla applicazione Window: il mittente/ricevente comunica al ricevente/mittente la quantità di memoria disponibile per momorizzare dati Options: le opzioni servono per scambiare specifici elementi di informazione tra mittente e destinatario, come il Maximum Segment Size (la massima dimensione del segmento che può essere accettata) Checksum: controllo derrore applicato alla sola intestazione TCP (non alla parte data), per il calcolo del codice di controllo derrore si assume che il campo checksum contenga una stringa di 0

10 Griglie ComputazionaliFile Transfer in Grids10 Multiplexing di connessioni Il multiplexing di connessioni consiste nella possibilita di stabilire molteplici connessioni TCP concorrenti in trasmissione o ricezione in un dato nodo. A questo scopo, vengono utilizzate le porte TCP: ogni punto terminale di una connessione in un dato host H e definito da un coppia di identificatori detta socket cosi formata: Socket = (TCP port, IP address(H)) Dunque una connessione TCP tra due nodi H1 e H2 e identificata dalla coppia di socket: Connessione = ( TCP source port, add(H1), TCP destination port, add(H2) ) Dunque in un dato istante un socket puo essere utilizzato da piu di una connessione: es. il socket associato ad un www server o ad un ftp server. 131.154.3.41 131.154.3.1 131.154.3.10 Sock2=(port2, 131.154.3.41) Sock1=(port1, 131.154.3.1) Sock3=(port3, 131.154.3.41) Sock4=(port4, 131.154.3.10) Sock5=(port5, 131.154.3.10) conn1 conn2 conn3 Conn1=(sock1, sock4) Conn2=(sock2, sock4) Conn3=(sock3, sock5)

11 Griglie ComputazionaliFile Transfer in Grids11 Positive acknowledgement P1P2P3P4 P5 ACK(s1+1) ACK(s2+1)ACK(s3+1) timeout t t Sn: numero di sequenza dellultimo byte delln-esimo messaggio; il numero di sequenza Iniziale del primo byte nel flusso di dati viene definito in fase di call set-up Svantaggio: ritardo tra la trasmissione di un messaggio e il successivo derivante dallattesa dellacknowledgement s1 P1 s2 P2 s3 P3 s4 P4 s5 P5 Numero di sequenza del byte MITTENTE RICEVENTE ACK duplicati

12 Griglie ComputazionaliFile Transfer in Grids12 Sliding window Ottimizzazione dellalgoritmo di positive acknowledgement in cui il mittente e autorizzato ad inviare m pacchetti (n byte) prima di porsi in attesa della ricezione dellacknowledgement relativo al primo messaggio inviato. n rappresenta la dimensione della window, ovvero la quantita di dati che il mittente e autorizzato ad inviare dopo essersi posto in attesa dellack del primo messaggio della window stessa Nel caso in cui il tempo che intercorre tra linvio del primo messaggio e la ricezione del relativo acknowledgement sia piccolo, il mittente può inviare dati in modo continuativo senza mai sperimentare periodi di inattività che limitano le prestazioni dellapplicazione. Il fenomeno contrario, in cui il mittente trascorre la maggior parte del tempo attendendo la ricezione dellack (per esempio su connessioni ad elevato tempo di propagazione, come nelle connessioni satellitari) viene detto: stop-and-wait. Il ricevente deduce la presenza di un messaggio perso nel caso in cui ack(Sn) non sia ricevuto entro un intervallo prestabilito, al termine del quale si procede con la ritrasmissione. La durata ottimale di tale timeout viene determinata stimando la media e la variazione del ritardo che intercorre tra la trasmissione di un messaggio e la ricezione del corrispondente acknowledgement (Round Trip Time)

13 Griglie ComputazionaliFile Transfer in Grids13 Sliding window (cont) P1P2 100by P3P4P5P6 ACK(s1) ACK(s2)ACK(s3)ACK(s4)ACK(s5) timeout t t Sn: numero di sequenza dellultimo byte delln-esimo messaggio; il numero di sequenza Iniziale del primo byte nel flusso di dati viene definito in fase di call set-up Ipotesi: ogni messaggio ha lunghezza costante di 100 by, la dimensione della window e costante e pari a 400 by. 200by 300by 400by by ACK(s3) 500by 600by 700by P4P5 ACK(s3) 800by P6P7P5 ACK(s6)ACK(s7)

14 Griglie ComputazionaliFile Transfer in Grids14 Terminologia 1: sequence number vecchi che hanno già ricevuto un acknowledgement 2: sequence number che non hanno ancora ricevuto un acknowledgement 3: sequence number di pacchetti che non sono stati ancora trasmessi ma che posono essere trasmessi essendo essi allinterno della window (SEND WINDOW) 4: sequence number futuri relativi a dati che non possono essere trasmessi, essendo essi esterni alla window 1: sequence number di pacchetti di cui è già stato inviato lack 2: spazio di memoria disponibile per la ricezione di nuovi dati (RECEIVE WINDOW) 3: sequence number futuri che non sono ancora ammessi Byte sequence number 1234 AL LATO MITTENTE : AL LATO RICEVENTE : Byte sequence number window send window acked not acked 123 receive windowackedSeq number non ancora autorizzati

15 Griglie ComputazionaliFile Transfer in Grids15 Terminologia (cont) offered window: la dimensione della finestra segnalata dal ricevente. Loffered window varia nel tempo, il valore massimo equivale alla dimensione di memoria disponibile per la memorizzazione di dati. Usable window: min [send window, offered window]

16 Griglie ComputazionaliFile Transfer in Grids16 PART II TCP: Controllo e prevenzione della congestione

17 Griglie ComputazionaliFile Transfer in Grids17 Controllo della congestione Per scoprire la presenza di un punto di congestione sul cammino di collegamento di due end-node, utilizzando un metodo che NON introduca traffico di monitoraggio aggiuntivo, può essere sufficiente effettuare una stima del ritardo di propagazione di un messaggio sul cammino (mittente destinatario mittente): RTT (Round Trip Time) Acknowledgement: messaggio inviato dal destinatario alla sorgente per segnalare che un dato messaggio M i e stato ricevuto correttamente Data una stima del round trip time RTT, se dopo RTT sec ack(M i ) non e stato ancora ricevuto si assume che M i sia stato perso e si procede con la ritrasmissione e la fase di controllo della congestione

18 Griglie ComputazionaliFile Transfer in Grids18 Meccanismi di controllo di flusso Si dividono in due gruppi: – Congestion control (implementato dallalgoritmo slow start), serve per fronteggiare situazioni di congestione grave, ovvero quando scade il timeout al lato mittente. E caratterizzato da un incremento esponenziale della usable window. – Congestion avoidance viene adottato in assenza di congestione grave, ovvero solo in presenza di acknowledgement duplicati. Permette un incremento graduale della usable window (lineare)

19 Griglie ComputazionaliFile Transfer in Grids19 Congestion Control (Slow Start) e Congestion Avoidance: meccanismo di base Slow Start Congestion Avoidance Connection opening : cwnd = 1 segment Exponential increase for cwnd until cwnd = SSTHRESH cwnd = SSTHRESH Additive increase for cwnd Retransmission timeout SSTHRESH:=cwnd/2 cwnd:= 1 segment Retransmission timeout SSTHRESH:=cwnd/2 Exponential increase for cwnd : for every useful acknowledgment received, cwnd := cwnd + (1 segment size) Additive increase for cwnd : for every useful acknowledgment received, cwnd := cwnd + (segment size)*(segment size) / cwnd it takes a full window to increment the window size by one.

20 Griglie ComputazionaliFile Transfer in Grids20 CONGESTION CONTROL

21 Griglie ComputazionaliFile Transfer in Grids21 Slow start TCP entra nella fase slow start ogni volta che viene riscontrata la perdita di un messaggio (cioè come conseguenza dello scadere di un timeout). TCP è nella fase di Slow start anche inizialmente, in apertura della connessione, e ogni qual volta una connessione TCP viene riattivata dopo un periodo di pausa La fase slow start serve per limitare il numero di pacchetti in transito tra la sorgente e il destinatario in presenza di congestione oppure inizialmente, quando deve essere ancora determinata la frequenza di trasmissione dei pacchetti ottimale, per incrementare in modo graduale la frequenza di trasmissione IMPLEMENTAZIONE: viene utilizzata una variabile chiamata congestion window (indicata con la sigla: cwind). Cwind è un parametro il cui valore varia durante le varie fasi di un trasferimento TCP secondo le seguenti regole: allinizio e per ogni restart di una trasmissione: cwind=1 ack ricevuto: cwind=cwind+const (e.g. const=1) Usable Window = min (cwind, RCV advertized window) Il tempo necessario affinché cwind raggiunga una ampiezza pari a W (supponendo che W sia espresso in pacchetti) varia secondo la regola: time = RTT * log 2 W CONGESTION CONTROL

22 Griglie ComputazionaliFile Transfer in Grids22 Slow Start (cont) Vantaggi: – non vengono inviati burst (=sequenze di pacchetti affiancati) che peggiorano la situazione di congestione nei colli di bottiglia della rate e nei router che iniettano traffico da una interfaccia I di input ad una di output O, dove capacita(I) > capacita(O) Svantaggi: – Poiché la window viene ridotta di dimensione in presenza di congestione, in caso di elevata percentuale di pacchetti persi (packet loss) la connessione non è mai in grado di sfruttare pienamente la banda disponibile su alcuni tratti della rete – In caso di connessioni ad alto tempo di propagazione (RTT >>, per esempio su link satellitari, in cui il tempo di propagazione e la componente più significativa della latenza end-to-end), la durata della fase slow start è considerevole, con un conseguente calo delle prestazione e una latenza superiore necessaria per raggiungere uno stato di equilibrio CONGESTION CONTROL

23 Griglie ComputazionaliFile Transfer in Grids23 P1 t P2P3 Ack(P1) Cwin=2 Cwin=1 Ack(P4) Cwin=5 Ack(P5) Cwin=6 Ack(P6) Cwin=7 Ack(P7) Cwin=8 P8P9P10P11P12P13P14P15 t Ack(P2) Cwin=3 Ack(P3) Cwin=4 P4P5P6P7 t RTT Packet Time: intervallo di tempo fra 2 pacchetti consecutivi Esempio Ack(P8) Cwin=9 CONGESTION CONTROL

24 Griglie ComputazionaliFile Transfer in Grids24 CONGESTION AVOIDANCE

25 Griglie ComputazionaliFile Transfer in Grids25 Congestion avoidance TCP si trova nella fase di congestion avoidance quando raggiunge una situazione di equilibrio (cioè TCP non è soggetto a perdita di pacchetti). In questa fase TCP tenta ancora di aumentare il parametro cwind allo scopo di verificare la possibilità di aumentare la frequenza di trasmissione dei pacchetti per raggiungere la MASSIMA frequenza trasmisssiva ammessa dai link di collegamento presenti nel cammino tra la sorgente e il destinatario. AUMENTO DELLA FREQUENZA TRASMISSIVA: Nella fase di congestion avoidance il parametro cwind viene aumentato in modo più lento e graduale, per esempio facendo in modo che anziché incremenatare esponenzialmente nel tempo (come nella fase di slow start), laumento sia lineare. In fase slow start: ack ricevuto, cwind=cwind+const In fase di congestion avoidance: ack ricevuto, cwind = cwind + const/cwind 1.const = 1 // se cwin espresso in numero di segmenti 2.const = MSS*MSS// cwin espresso in byte ovvero ad ogni scadere di 1 RTT, cwind aumenta allincirca di 1 messaggio. Lo scopo e quello di evitare la sovrastima della banda disponibile per non entrare nuovamente nella fase di slow start. CONGESTION AVOIDANCE

26 Griglie ComputazionaliFile Transfer in Grids26 Congestion avoidance (cont) DIMINUZIONE DELLA FREQUENZA TRASMISSIVA: 1.In presenza di ack duplicati (ack del medesimo sequence number S i ) la window size viene ridotta secondo la regola moltiplicativa: cwind i = d * cwind i-1 (d < 1, e.g. 1/2) cwind e espresso in byte 2.In presenza di un timeout che scade si passa alla fase di slow start: cwind=1 In caso di congestione persistente la formula al punto 1. produce un effetto di decrescita esponenziale nel tempo del parametro (essendo applicata ad ogni messaggio iterativamente) Anche in fase di congestion avoidance, in ogni istante: W = min(cwind, RCV advertized win) CONGESTION AVOIDANCE

27 Griglie ComputazionaliFile Transfer in Grids27 Come si passa dalla fase di congestion control a quella di congestion avoidance e viceversa? Si utilizza una variabile (threshold T) tale che: – Inizialmente T=64 KB – Se cwind < T: TCP in fase di slow start (congestion control) – Se cwind T: TCP in fase di congestion avoidance Quando si passa dalla fase di congestion avoidance a quella di congestion control? Al lato mittente ogni qual volta scade un timeout, il parametro T viene dimezzato: T := cwind/2, e cwind=1 A questo punto comincia la fase di slow start. CONGESTION AVOIDANCE CONGESTION CONTROL

28 Griglie ComputazionaliFile Transfer in Grids28 Slow start e congestion avoidance: esempio Cwnd average of the last 10 samples. Cwnd average over the life of the connection to that point Slow start Congestion Avoidance SSTHRESH Slow start : incremento rapido di cwnd Congestion Avoidance : incremento piu lento della cwnd

29 Griglie ComputazionaliFile Transfer in Grids29 Infulenza del parametro threshold T sulle prestazioni SSTHRESH = 730Kbyte SSTHRESH = 1460Kbyte Slow start Congestion avoidance Durante la fase di congestion avoidance e in assenza di perdite di paccheti, cwnd incrementa di un segmento per ogni RTT. Nel nostro caso, essendo tutti i pacchetti ricevuti correttamente, la window incrementa di 1460 byte (supponendo una MTU di 1500 by) ogni 175 ms. Se la cwnd e pari a 730 kbyte, sono necessari almeno 4 minutes per ottenere una cwnd piu larga dek prodotto bandwidth*delay (nel nostro esempio pari a 2,65 MByte). In altri termini, sono necessari almeno 4 min per ottenere un pieno utilizzo della banda.

30 Griglie ComputazionaliFile Transfer in Grids30 PART III File Transfer Protocol

31 Griglie ComputazionaliFile Transfer in Grids31 Objectives of the Protocol (FROM RFC 959, Oct 1985) The objectives of FTP are: 1.to promote sharing of files (computer programs and/or data), 2.to encourage indirect or implicit (via programs) use of remote computers, 3.to shield a user from variations in file storage systems among hosts (FTP, though usable directly by a user, is designed mainly for use by programs and consequently variations can be operated through FTP by programs), 4.to transfer data reliably and efficiently.

32 Griglie ComputazionaliFile Transfer in Grids32 Collective File Transfer Protocol Application Fabric Connectivity Resource Internet Transport Application Link Internet Protocol Architecture Grid Architecture Internet Architecture (Grid)FTP

33 Griglie ComputazionaliFile Transfer in Grids33 Network Enabled Services: the Protocol Stack All services require protocols Not all protocols are used to provide services (e.g. IP, TLS) Examples: FTP and Web servers Web Server IP Protocol TCP Protocol TLS Protocol HTTP Protocol FTP Server IP Protocol TCP Protocol FTP Protocol Telnet Protocol

34 Griglie ComputazionaliFile Transfer in Grids34 History FTP has had a long evolution over the years: – 1971 (RFC 114): the first proposed file transfer mechanisms in 1971 that were developed for implementation on hosts at M.I.T. – 1972 (RFC 354): The File Transfer Protocol was now defined as a protocol for file transfer between HOSTs on the ARPANET, with the primary function of FTP defined as transferring files efficiently and reliably among hosts and allowing the convenient use of remote file storage capabilities. – 1973 (RFC 542): new official specification – 1980 (RFC 765): specification of FTP for use on TCP –... – 2003: GridFTP: Protocol Extensions to FTP for the Grid – 2004: GridFTP v2 Protocol Description

35 Griglie ComputazionaliFile Transfer in Grids35 The FTP Model 1: User-to-Server Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User InterfaceUser Server-FTP User-FTP A user wishes to transfer files between two hosts, of which one is a local host.

36 Griglie ComputazionaliFile Transfer in Grids36 The FTP Model 2: Server-to-Server FTP Commands FTP Replies Connection Data Server-FTP A Server-FTP B User-FTP and User-PI C A user might wish to transfer files between two hosts, neither of which is a local host. The user sets up control connections to the two servers and then arranges for a data connection between them. Control information is passed to the user-PI but data is transferred between the server data transfer processes. FTP Commands FTP Replies

37 Griglie ComputazionaliFile Transfer in Grids37 Server and User-FTP Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP Server-FTP: a process or set of processes which perform the function of file transfer in cooperation with a user-FTP process and, possibly, another server. The functions consist of a protocol interpreter (PI) and a data transfer process (DTP) User-FTP: A set of functions including a protocol interpreter, a data transfer process and a user interface which together perform the function of file transfer in cooperation with one or more server-FTP processes. The user interface allows a local language to be used in the command-reply dialogue with the user.

38 Griglie ComputazionaliFile Transfer in Grids38 Data Transfer Protocol Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP Data Transfer Protocol: establishes and manages the data connection, it can be passive (if the protocol waits for incoming connections) or active (if it requests the opening of a connection). Data Port: The passive data transfer process "listens" on the data port for a connection from the active transfer process in order to open the data connection.

39 Griglie ComputazionaliFile Transfer in Grids39 Control and Data Connections Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP Control connection: The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol. It is based on the TCP protocol. Data connection: A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be: - a part of a file, -an entire file or -a number of files. The path may be between a server-DTP and a user-DTP, or between two server-DTPs. It is based on the TCP protocol.

40 Griglie ComputazionaliFile Transfer in Grids40 Commands and Replies Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP FTP Commands: a set of commands that comprise the control information flowing from the user-FTP to the server-FTP process. Reply: an acknowledgment (positive or negative) sent from server to user via the control connection in response to FTP commands. The general form of a reply is a completion code (including error codes) followed by a text string. The codes are for use by programs and the text is usually intended for human users.

41 Griglie ComputazionaliFile Transfer in Grids41 Set-up of an FTP Session (1/2) Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP 1. In this model, the user- protocol interpreter initiates the control connection. The control connection follows the Telnet protocol. 2. The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.).

42 Griglie ComputazionaliFile Transfer in Grids42 Set-up of an FTP Session (2/2) Server Protocol Interpreter Server Data Transfer Protocol User Protocol Interpreter User Data Transfer Protocol FTP Commands FTP Replies Connection Data File System User Interface User Server-FTP User-FTP 3. The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters. The data port need not be in the same host that initiates the FTP commands via the control connection, but the user or the user-FTP process must ensure a "listen" on the specified data port. 4. The data connection may be used for simultaneous sending and receiving.

43 Griglie ComputazionaliFile Transfer in Grids43 Data Connection Parameters Files are transferred only via the data connection. The control connection is used for the transfer of commands, which describe the functions to be performed, and the replies to these commands (see the Section on FTP Replies). Data transfer commands include: – MODE command which specify how the bits of the data are to be transmitted, – STRUcture and TYPE commands: which are used to define the way in which the data are to be represented.

44 Griglie ComputazionaliFile Transfer in Grids44 Data Representation Data is transferred from a storage device in the sending host to a storage device in the receiving host. Often it is necessary to perform certain transformations on the data because data storage representations in the two systems are different. For example, data storage representations of Network Virtual Terminal ASCII (telnet protocol): – five 7-bit ASCII characters, left-justified in a 36-bit word – four 9-bit characters in a 36-bit word. It is desirable to convert characters into the standard NVT-ASCII representation when transmitting text between dissimilar systems. The sending and receiving sites would have to perform the necessary transformations between the standard representation and their internal representations.

45 Griglie ComputazionaliFile Transfer in Grids45 Structures FILE STRUCTURE – File structure is the default to be assumed if the STRUcture command has not been used. In file-structure there is no internal structure and the file is considered to be a continuous sequence of data bytes. RECORD STRUCTURE – Record structures must be accepted for "text" files (i.e., files with TYPE ASCII or EBCDIC) by all FTP implementations. In record-structure the file is made up of sequential records. PAGE STRUCTURE – To transmit files that are discontinuous, FTP defines a page structure. Files of this type are sometimes known as "random access files. In these files there is sometimes other information associated with the file as a whole (e.g., a file descriptor), or with a section of the file (e.g., page access controls), or both. In FTP, the sections of the file are called pages. To provide for various page sizes and associated information, each page is sent with a page header.

46 Griglie ComputazionaliFile Transfer in Grids46 PART GridFTP

47 Griglie ComputazionaliFile Transfer in Grids47 Grid Data Needs Transfer of large amounts of data (petabytes or terabytes) between storage systems – Striping across multiple servers to improve performance – Network traffic load balancing Access to large amounts of data (terabytes or gigabytes) by many geographically distributed applications and users for analysis, visualization, etc. Issues: – Lack of a common protocol to access data (only multiple incompatible APIs are available) – Authentication and authorization – Management of consistency between different replicas of the same file – Location of multiple file replicas – Selection of best file replica

48 Griglie ComputazionaliFile Transfer in Grids48 Requirements Grid Security Infrastructure (GSI) and Kerberos support Third-party control of data transfer (e.g. data exchange driver by schedulers) Parallel data transfer: multiple TCP streams between two given end-points Striped data transfer Partial file transfer Automatic negotiation of TCP buffer/window size Support for reliable/recoverable data transfer GridFTP extends standards with: additions to security extensions, partial file transfer, parallel/striped transfer, TCP buffer/window size tuning

49 Griglie ComputazionaliFile Transfer in Grids49 Grid Security Infrastructure and Kerberos Authentication, integrity and confidentiality features are critical when transferring or accessing files. GridFTP supports both GSI and Kerberos autenitcation. User-controlled setting of various levels of data integrity and or/confidentiality on the data channel: – No authentication – Self authentication (the identity of the remote data connection has to be the same as the identity of the user which authenticated to the control connection) – Subject-name authentication (the identity of the remote data connection must match the supplied subject-name)

50 Griglie ComputazionaliFile Transfer in Grids50 Third-party control of data transfer and TCP buffer tuning Third-party control: – in order to manage large data sets, it is necessary to provide third-party control of transfers between storage servers. – GridFTP provides this capability by adding GSSAPI security to the existing third-party transfer capability defined in the FTP standard Manual control of TCP buffer size: – In order to achieve optimize bandwidth with TCP/IP, the protocol needs support for automatic buffer size tuning – A specific command SBUF (set buffer size) is introduced – The Autonegotiate buffer size (ABUF) command allows the invocation of an algorithm to determine and set the TCP buffer size (any algorithm can be chosen)

51 Griglie ComputazionaliFile Transfer in Grids51 Parallel data transfer On wide-area links, using multiple TCP streams can improve aggregate bandwidth over using a single TCP stream. This is required both between a single client and a single server, and between two servers. GridFTP supports this through extensions to the commands and the data channel. In particular: – It can be controlled how many parallel data connections may be established to each destination data node: fixed level and variable level (where the number of connections varies according to the network performance) – Starting-parallelism: the data connections are enabled by the server-ftp – Miximum-parallelism: the number of open data connections is reduced to the specified minimum – Maximum-parallelism: the number of open data connections is increased up to the specified maximum S1D1

52 Griglie ComputazionaliFile Transfer in Grids52 Striped Data Transfer Data is partitioned across multiple servers, in order to improve aggregate bandwidth. There are one or more TCP streams between M network end-points on the sending side and N network end-points on the receiving side. The end-point is called data node. Layout option issued by the source data node: – Partitioned: a partitioned data layout is one where the data is distributed evenly on the destinatio ndata nodes. Only one contiguous section of data is stored on each data node. – Blocked: the data is distributed in round-robin fashion over the destination data nodes S1D1 S2D2 D3 M N Data nodes

53 Griglie ComputazionaliFile Transfer in Grids53 Striped Data Transfer (cont) New commands: – SPAS: Striped Passive allows an array of host/port connections to be RETURNED Multiple end-points (multihomed hosts or multiple hpsts9participate in the transfer – SPOR: Striped Port Allows an array of host/port connections to be SENT

54 Griglie ComputazionaliFile Transfer in Grids54 Partial file transfer and reliable data transfer Partial file transfer: – Standard FTP requires the application to: transfer the entire file, Or the remainder of a file starting at a particular offset. – GridFTP introduces new FTP commands to support transfers of regions of a file. Reliable data transfer: – Fault recovery methods for handling transient network failures, server outages etc. – The FTP standard includes basic features for restarting failed transfer that are noo widely implemented. – GridFTP to these features, for example by supporting: Automatic retry Re-scheduling of a transfer fo a later time Switching to alternate soruces by means of a replica catalog

55 Griglie ComputazionaliFile Transfer in Grids55 Integrated instrumentation (1/2) The protocol calls for restart and performance markers to be sent back. It is not specified how often, but it would be important to give the possibility to specify this parameter Restart: the command is issued by the client and it indicates the byte ranges whose transfer needs to be restarted. – Byte ranges which have been succesfully stored to disk are recorded and notified to the client; – Complete restart marker: a concatenation of all ranges received by the data server on the control channel. It is computed by the client by aggregating contiguous ranges. – The client requests a restart by specifying for what byte ranges the transfer needs to be restarted. Data server Client 1. Byte ranges 2. Restart (complete restart marker)

56 Griglie ComputazionaliFile Transfer in Grids56 Integrated instrumentation (2/2) The performance response of a server is extende by adding the following pieces of information: – Timestamp: time at which the server computed the performance information; – Stripe index. The stripe index that the marker pertains to (for monitoring of striped FTP); – Stripe bytes transferred: the number of bytes which have been received on this stripe (for striped FTP monitoring); – Total stripe count: the total number of stripes participating in this transfer; – Transfer start time.

57 Griglie ComputazionaliFile Transfer in Grids57 References File Transfer Protocol, RFC 959. GridFTP: Protocol Extensions to FTP for the Grid; B.Allcock et alt.; GGF Recommendation, Apr 2003.


Scaricare ppt "Griglie ComputazionaliFile Transfer in Grids1 INFN – CNAF Corso di Laurea specialistica in Informatica Anno Acc. 2004/2005."

Presentazioni simili


Annunci Google