CN106899510B - Transmission rate control method and device based on iSCSI protocol - Google Patents

Transmission rate control method and device based on iSCSI protocol Download PDF

Info

Publication number
CN106899510B
CN106899510B CN201510957174.1A CN201510957174A CN106899510B CN 106899510 B CN106899510 B CN 106899510B CN 201510957174 A CN201510957174 A CN 201510957174A CN 106899510 B CN106899510 B CN 106899510B
Authority
CN
China
Prior art keywords
session
transmission rate
iscsi
current moment
tcp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510957174.1A
Other languages
Chinese (zh)
Other versions
CN106899510A (en
Inventor
刘洪军
吴勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510957174.1A priority Critical patent/CN106899510B/en
Priority to PCT/CN2016/110470 priority patent/WO2017101875A1/en
Publication of CN106899510A publication Critical patent/CN106899510A/en
Application granted granted Critical
Publication of CN106899510B publication Critical patent/CN106899510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/16Flow control; Congestion control in connection oriented networks, e.g. frame relay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer
    • H04L47/193Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention discloses a transmission rate control method based on an iSCSI protocol, which comprises the following steps: acquiring the session transmission rate of the iSCSI session at the current moment; judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value; if so, adding a new TCP connection in the iSCSI session. The embodiment of the invention also discloses a transmission rate control device based on the iSCSI protocol. The invention can self-adaptively adjust the transmission rate of the iSCSI session according to the transmission requirement.

Description

Transmission rate control method and device based on iSCSI protocol
Technical Field
The invention relates to the field of communication, in particular to a transmission rate control method and a device based on an iSCSI protocol.
Background
The iSCSI (Internet Small Computer System Interface, iSCSI for short) technology can realize the operation of SCSI protocol on IP network, and users can use the mature IP network to construct storage area network.
Referring to fig. 1, a system structure diagram based on the iSCSI Protocol is shown, where an initiator serves as a client, a target serves as a server, and the initiator and the target transmit data through an established iSCSI session, where the iSCSI session includes one or more TCP (Transmission Control Protocol, TCP for short) connections. Since the iSCSI protocol is carried over TCP, a TCP connection needs to be established before an iSCSI session is established. The iSCSI protocol transmission based on IP relies on TCP connection, and data such as response and acknowledgement corresponding to the iSCSI request sent by one TCP connection must be returned by the same TCP connection.
When the initiator and the target transmit data through the iSCSI session, certain transmission resources are allocated for the iSCSI, and in the subsequent transmission process, the transmission resources occupied by the iSCSI session are not changed, but the complex and variable transmission environment cannot be well adapted when the data volume between the initiator and the target fluctuates.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a transmission rate control method and device based on the iSCSI protocol. The transmission rate of the iSCSI session may be adaptively adjusted based on transmission requirements.
In a first aspect, an embodiment of the present application provides a transmission rate control method based on an iSCSI protocol, including:
the execution main body for implementing the embodiment of the invention comprises a sending end which can be an initiating end or a target end in an iSCSI protocol. The method comprises the steps that a transmission end presets a set transmission rate requirement value, the transmission rate requirement value is an expected value which an iSCSI session needs to reach, the transmission end periodically obtains the session transmission rate of the iSCSI session at the current moment, and whether the session transmission rate of the iSCSI session at the current moment is smaller than the preset transmission rate requirement value or not is judged; if so, establishing a new TCP connection, allocating transmission resources for the new TCP connection, and adding the new TCP connection in the iSCSI session so as to increase the session transmission rate of the iSCSI session and enable the session transmission rate of the iSCSI session to reach a preset transmission rate requirement value. And if the session transmission rate at the current moment is greater than or equal to the preset transmission rate requirement value, the transmitting terminal indicates that the transmission requirement is met, and the transmitting terminal stops adding new TCP connection into the iSCSI session.
In one design, before determining whether the session transfer rate of the iSCSI session at the current time is less than a preset transfer rate requirement value, the initiator determines whether the session transfer rate of the iSCSI session at the current time is increased compared to the previous time, and if so, performs a step of determining whether the session transfer rate of the iSCSI session at the current time is less than the preset transfer rate requirement value. After adding a new TCP connection to the iSCSI session at the current moment, if the transmission resources (such as memory, CPU or bandwidth) of the system are idle, the session transmission rate of the iSCSI session is correspondingly increased when the sending end acquires the iSCSI session at the next moment; if the session transfer rate of the iSCSI session is not increased at the next moment, which indicates that the transfer resources of the system are saturated and are not idle, the new TCP connection is continuously added in the iSCSI session, and the session transfer rate is not increased.
In another possible design, the method for the initiator to obtain the session transfer rate of the iSCSI session at the current time may be:
firstly, a transmitting terminal determines which TCP connections an iSCSI session comprises; aiming at each TCP connection included in the iSCSI session, a sending end acquires a response message received by the TCP connection at the current moment and a response message received by the TCP connection at the last moment, and calculates the TCP transmission rate of the TCP connection according to the timestamps and the serial numbers of the two response messages, wherein the formula specifically comprises the following steps: sn=(ACKn-ACKn-1)/(Tn-Tn-1),ACKnIndicating the sequence number, ACK, of the reply message received at the current momentn-1Indicating the sequence number, T, of the reply message received at the last momentnTime stamp, T, representing the response message received at the current momentn-1Time stamp representing the response message received at the last moment, SnRepresenting the TCP transmission rate of the TCP connection at the current moment, calculating the TCP transmission rates of all TCP connections included in the iSCSI session by the sending terminal according to the formula, and summing the TCP transmission rates of all TCP connections to obtain the session transmission rate S of the iSCSI session at the current momentn
In another design, after the initiator obtains the session transfer rate of the iSCSI session at the current time, it needs to obtain α × S according to the formulan-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, for the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the previous time. And introducing historical session transmission rate, and smoothing the session transmission rate calculated at the current moment to avoid overlarge session transmission rate playing.
In another design, when the sending end needs to reduce the session transmission rate of the iSCSI session, first, the preset transmission rate requirement value corresponding to the iSCSI session is reduced from R1 to R2, then, the sending end periodically obtains the session transmission rate of the iSCSI session at the current time, and determines that the session transmission rate of the iSCSI session can continue to be reduced, where the determining method may be: and judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session, if so, indicating that the reduction can be continued. If the session transmission rate of the iSCSI session can be continuously reduced, removing the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate and the T at the current moment from the iSCSI session, and releasing the transmission resource occupied by the removed TCP connection; T-R1-R2.
In another possible design, the method for the initiator to determine whether the session transfer rate of the iSCSI session needs to be decreased may be: judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session; if so, the session transmission rate of the iSCSI session does not need to be reduced; if not, the session transfer rate of the iSCSI session needs to be decreased.
In another possible design, a sending end obtains a load parameter value at the current moment; reducing a preset transmission rate required value under the condition that the load parameter value is larger than a preset value;
and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
In a second aspect, an embodiment of the present application provides a transmission rate control apparatus based on an iSCSI protocol, the apparatus including: the device comprises an acquisition module, a first judgment module and an adjustment module.
The method comprises the steps that an acquisition module acquires the session transmission rate of an iSCSI session at the current moment, and a first judgment module judges whether the session transmission rate acquired by the acquisition module is smaller than a preset transmission rate requirement value or not; if the judgment result of the first judgment module is yes, the adjusting module adds a new TCP connection in the iSCSI session.
In one possible design, the apparatus further includes: and a second judgment module.
The second judging module judges whether the session transmission rate of the iSCSI session at the current moment is increased compared with the session transmission rate at the previous moment, and if so, the first judging module is indicated to start working.
In another possible design, the obtaining module may determine that the iSCSI session includes multiple TCP connections; respectively calculating the TCP transmission rate of each TCP connection at the current moment according to the sequence numbers and the time stamps of the at least two confirmation messages; summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate S of the iSCSI session at the current momentn
In another possible design, the apparatus further includes a smoothing module.
The smoothing module is according to the formula α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, for the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the previous time.
In another possible design, the apparatus further includes a speed reduction module. In the case that the session transfer rate of the iSCSI session needs to be slowed down, the transfer rate requirement value corresponding to the iSCSI session is reduced from R1 to R2, and R1 > R2. The speed reduction module periodically judges whether the session transmission rate of the iSCSI session at the current moment is continuously reduced, if so, the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate and the T at the current moment is removed from the iSCSI session, and the transmission resource occupied by the removed TCP connection is released; T-R1-R2.
In another possible design, the speed reduction module determines whether the session transfer rate of the iSCSI session at the current time is less than R2 or whether the difference between the session transfer rate of the iSCSI session at the current time and R2 is less than the TCP transfer rate of any TCP connection included in the iSCSI session; if so, the session transmission rate of the iSCSI session does not need to be reduced; if not, the session transfer rate of the iSCSI session needs to be reduced.
In another possible design, the apparatus further includes: and a threshold adjusting module.
A threshold value adjusting module acquires a load parameter value at the current moment; reducing a preset transmission rate required value under the condition that the load parameter value is larger than a preset value; and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
In a third aspect, an embodiment of the present application provides a terminal device, which includes any of the above all iSCSI protocol-based transmission rate control devices.
In a fourth aspect, an embodiment of the present application provides a transmission rate control apparatus based on an iSCSI protocol, including:
one or more processors, memory, a bus system, a transceiver, and one or more programs, the processors, memory, and transceiver being coupled via the bus system;
wherein the one or more programs are stored in the memory, the one or more programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the method as any one of the first aspect and the fifth possible implementation of the first aspect.
In a fifth aspect, the present application provides a computer readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by the apparatus, cause the apparatus to perform the method of any one of the first aspect to the sixth possible implementation manner of the first aspect.
The embodiment of the invention has the following beneficial effects:
and acquiring the session transmission rate of the iSCSI session in real time, and adding a new TCP connection in the iSCSI session to fully utilize idle transmission resources under the condition that the session transmission rate is less than a preset transmission rate requirement value, thereby improving the transmission rate of the iSCSI session.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an architecture of a prior art iSCSI protocol-based transmission system;
FIG. 2 is a flowchart illustrating a method for controlling transmission rate based on iSCSI protocol according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a method for controlling transmission rate based on iSCSI protocol according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a method for controlling transmission rate based on iSCSI protocol according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a transmission rate control apparatus based on iSCSI protocol according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a transfer rate control apparatus based on the iSCSI protocol according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, in an embodiment of the present invention, an execution main body is a sender, where the sender may be an initiator or a target, and the following initiator is described as the method for controlling a transmission rate based on an iSCSI protocol, where the method includes:
s201, obtaining the session transmission rate of the iSCSI session at the current moment.
Specifically, the iSCSI session includes a plurality of TCP connections, and an initiator (initiator) transmits a Protocol Data Unit (PDU) to a target (target) through the iSCSI session including the plurality of TCP connections. The current time represents a time with a sequence number n, for example, the initiator acquires the session transmission rate of the iSCSI session at intervals, the first acquisition time is time 1, the 2 nd acquisition time is time 2, and so on, and the third acquisition time is the current time, where the session transmission rate at which the initiator acquires the iSCSI session may be acquired periodically or aperiodically, which is not limited in the present invention. Preferably, the initiating end periodically obtains the transmission rate of the iSCSI session, that is, the time interval between the current time and the next time is a fixed value.
S202, judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value.
Specifically, the transfer rate requirement value indicates a transfer rate that the iSCSI session is expected to achieve, and the specific transfer rate requirement value is preset as needed. And the initiating terminal judges the relationship between the session transmission rate of the iSCI session at the current moment and the preset transmission rate requirement value.
S203, if the judgment result is yes, adding a new TCP connection in the iSCSI session.
Specifically, if the determination result in S102 is yes, the initiator reconstructs a new TCP connection, allocates transmission resources for the new TCP connection, and adds the new TCP connection to the iSCSI session, so as to improve the transmission rate of the iSCSI session.
Wherein, under the condition that the judgment result of the S102 is negative, the initiating end does not add new TCP connection and exits the transmission rate control flow of the iSCSI conversation.
It can be seen from the above that, the session transfer rate of the iSCSI session is obtained in real time, and when the session transfer rate is smaller than the preset transfer rate requirement value, a new TCP connection is added in the iSCSI session, and idle transfer resources are fully utilized, thereby improving the transfer rate of the iSCSI session.
Referring to fig. 3, another flow chart of a transmission rate control method based on the iSCSI protocol according to an embodiment of the present invention is shown, where in the embodiment of the present invention, the method includes:
s301, determining a plurality of TCP connections included in the iSCSI session at the current moment.
Specifically, the iSCSI session includes a plurality of TCP connections, at different times, due to different transmission requirements, the number of TCP connections included in the iSCSI session may change dynamically, different TCP connections have different ID identifiers, and the initiator may determine the plurality of TCP connections included in the iSCSI session at the current time according to the ID identifiers of the TCP connections.
S302, respectively calculating the TCP transmission rate of each TCP connection at the current moment according to the sequence numbers and the time stamps of at least two confirmation messages.
Specifically, the method for calculating the TCP transmission rate of one TCP connection may be that: the method comprises the steps that an initiating terminal numbers a protocol data unit PDU to be sent, when the initiating terminal sends the protocol data unit to a target terminal through TCP connection, the protocol data unit carries a serial number, when the target terminal successfully receives the protocol data unit through the TCP connection, the target terminal obtains the serial number carried in the protocol data unit, a response message carrying the serial number is returned to the initiating terminal, the initiating terminal receives the response message, a timestamp of receiving the response message is recorded, and the serial number carried in the response message is obtained. The initiating terminal obtains a timestamp and a sequence number corresponding to each response message by receiving at least two response messages, and calculates the transmission rate of the TCP at the current moment according to the timestamp and the sequence number: sn=(ACKn-ACKn-1)/(Tn-Tn-1),ACKnIndicating the sequence number, ACK, of the reply message received at the current momentn-1Indicating the sequence number, T, of the reply message received at the last momentnTime stamp, T, representing the response message received at the current momentn-1Time stamp representing the response message received at the last moment, SnThe TCP transmission rate of the TCP connection at the current time is calculated according to the sequence numbers and the time stamps of two consecutively received response messages in the above example, but the TCP transmission rate calculation method is not limited thereto, for example, the initiating end may calculate the TCP transmission rate of the TCP connection at the current time according to the sequence numbers and the time stamps of more than two response messagesCalculating the TCP transmission rate of the TCP connection by the stamp, taking the two received response messages as a group, calculating according to the formula, and carrying out weighted average on the calculated multiple groups of TCP transmission rates to obtain the TCP transmission rate of the TCP connection at the current moment.
S303, summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate of the iSCSI session at the current moment.
Specifically, the initiating end calculates the TCP transmission rates of the TCP connections included in the iSCSI session according to the method of S302, and sums the TCP transmission rates to obtain the TCP transmission rate of the iSCSI session at the current time.
S304, carrying out smooth processing on the session transmission rate of the iSCSI session at the current moment.
Specifically, because of the time delay confirmation mechanism of the response message, network congestion, etc., the problem that the session transmission rate of the iSCSI session calculated by the initiator at the current moment has large fluctuation exists, and in order to facilitate the processing of the calculated session transmission rate, the session transmission rate of the initiator introducing the iSCSI session history is used to smooth the session transmission rate at the current moment, wherein the smoothing processing mode can be α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, for the iSCSI session at the current timen-1The values of α and β may be adjusted as needed for the session transfer rate of the iSCSI session at the previous time, and the present invention is not limited thereto, for example, α is 0.9 and β is 0.1.
S305, whether the session transmission rate of the iSCSI session at the current moment is increased compared with the session transmission at the last moment is judged.
Specifically, the session transmission rate of the iSCSI session at the current time and the session transmission rate at the previous time are the session transmission rate after being smoothed in S304, or the session transmission rate without being smoothed, the initiator determines whether the session transmission rate of the iSCSI session at the current time is increased compared with the session transmission rate at the previous time, and if the determination result is yes, it indicates that the session transmission rate of the iSCSI session has a possibility of being further increased, the initiator performs S306; if the result of the determination is negative, indicating that there is no possibility of further increase of the session transfer rate of the iSCSI session, S307 is performed.
S306, whether the transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value or not.
Specifically, the transfer rate requirement value is an expected value of the set session transfer rate of the iSCSI session, and a specific value may be preset as needed. The initiating terminal judges whether the transmission rate of the iSCSI session at the current moment obtained by the S304 is smaller than a preset transmission rate required value, if so, the transmission rate of the iSCSI session at the current moment is not reached to an expected value, and the transmission rate of the iSCSI session needs to be further increased; if the judgment result is negative, the expected value is reached.
S307, stopping adding TCP connection in the iSCSI session.
Specifically, the purpose of adding the TCP connection in the iSCSI session is to improve the session transfer rate of the iSCSI session, the session transfer rate of the iSCSI session at the current time is not increased compared with the session transfer rate at the previous time, which indicates that the network bandwidth is saturated, the TCP connection is continuously added to the iSCSI session without increasing the session transfer rate, and the initiator stops adding a new TCP connection to the iSCSI session at this time; alternatively, the session transfer rate of the iSCSI session may have reached the predetermined transfer rate requirement, and the initiator may stop adding new TCP connections to the iSCSI session.
S308, adding a new TCP connection in the iSCSI session.
Wherein, S301-S308 are steps executed in a loop, and the initiating end periodically executes the steps of S301 and S308 until exiting the process. When the initiator determines that a new TCP connection needs to be added in the iSCSI session, the initiator establishes a new TCP connection, allocates transmission resources for the established new TCP connection, adds the new TCP connection into the iSCSI session, increases the number of the TCP connections in the iSCSI session after the new TCP connection is added, and continues to execute S301-S308 according to the description when the next time arrives.
It can be seen from the above that, the session transfer rate of the iSCSI session is obtained in real time, and when the session transfer rate is smaller than the preset transfer rate requirement value, a new TCP connection is added in the iSCSI session, and idle transfer resources are fully utilized, thereby improving the transfer rate of the iSCSI session.
Referring to fig. 4, a schematic flowchart of another method for controlling a transmission rate based on an iSCSI protocol according to an embodiment of the present invention is shown, where in the embodiment of the present invention, the method includes:
s401, determining a plurality of TCP connections included in the iSCSI session at the current moment.
Specifically, the iSCSI session includes a plurality of TCP connections, at different times, due to different transmission requirements, the number of TCP connections included in the iSCSI session may change dynamically, different TCP connections have different ID identifiers, and the initiator may determine the plurality of TCP connections included in the iSCSI session at the current time according to the ID identifiers of the TCP connections.
S402, respectively calculating the TCP transmission rate of each TCP connection at the current moment according to the sequence numbers and the time stamps of the at least two confirmation messages.
Specifically, the method for calculating the TCP transmission rate of one TCP connection may be that: the method comprises the steps that an initiating terminal numbers a protocol data unit PDU to be sent, when the initiating terminal sends the protocol data unit to a target terminal through TCP connection, the protocol data unit carries a serial number, when the target terminal successfully receives the protocol data unit through the TCP connection, the target terminal obtains the serial number carried in the protocol data unit, a response message carrying the serial number is returned to the initiating terminal, the initiating terminal receives the response message, a timestamp of receiving the response message is recorded, and the serial number carried in the response message is obtained. The initiating terminal obtains a timestamp and a sequence number corresponding to each response message by receiving at least two response messages, and calculates the transmission rate of the TCP at the current moment according to the timestamp and the sequence number: sn=(ACKn-ACKn-1)/(Tn-Tn-1),ACKnIndicating the sequence number, ACK, of the reply message received at the current momentn-1Indicating the sequence number, T, of the reply message received at the last momentnTime stamp, T, representing the response message received at the current momentn-1Time stamp representing the response message received at the last moment, SnThe TCP transmission rate of the TCP connection at the current time is shown, and the above example is to calculate the TCP transmission rate of the TCP connection at the current time according to the sequence numbers and the timestamps of two consecutively received response messages, but the calculation method of the TCP transmission rate is not limited to this, for example, the originating terminal may calculate the TCP transmission rate of the TCP connection according to the sequence numbers and the timestamps of two or more response messages, calculate according to the above formula with the two received response messages as one group, and obtain the TCP transmission rate of the TCP connection at the current time by performing weighted average on the calculated multiple groups of TCP transmission rates.
S403, summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate of the iSCSI session at the current moment.
Specifically, the initiating end calculates the TCP transmission rate of each TCP connection included in the iSCSI session according to the method of S402, and sums the TCP transmission rates to obtain the TCP transmission rate of the iSCSI session at the current time.
S404, whether the session transmission rate of the iSCSI session at the current moment is continuously reduced or not.
Specifically, multiple TCP connections included in an iSCSI session may be created when the load of the system is reduced, and occupy more transmission resources, and at this time, if a new iSCSI session needs to be created, the new iSCSI session may not allocate enough transmission resources, in which case, part of the TCP connections in the original iSCSI session need to be removed, so that the transmission rate requirement value of the original iSCSI session is reduced from R1 to R2, and R1 > R2.
The initiating end of the iSCSI session judges whether the transmission rate of the iSCSI session at the current moment needs to be reduced, if so, S405 is executed, and if not, S407 is executed. The method for the initiating terminal to judge whether the session transmission rate at the current moment needs to be reduced is as follows: judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session; if so, the session transmission rate of the iSCSI session at the current moment meets the requirement of the transmission rate requirement value R2, and the session transmission rate of the iSCSI session does not need to be adjusted; if not, the session transfer rate of the iSCSI session at the current moment does not meet the requirement of the transfer rate requirement value R2, and the session transfer rate of the iSCSI session needs to be adjusted.
S405, selecting one TCP connection in the iSCSI session to remove.
Specifically, the TCP connection with the smallest absolute value of the difference between the TCP transmission rate at the current time and T is removed from the iSCSI session as T R1-R2.
S406, releasing the transmission resources occupied by the removed TCP connection.
Specifically, the transmission resource includes one or more of a CPU resource, a memory resource, and a bandwidth resource.
S407, stopping removing the TCP connection included in the iSCSI session.
It can be seen from the above that, the session transfer rate of the iSCSI session is obtained in real time, and when the session transfer rate is smaller than the preset transfer rate requirement value, a new TCP connection is added in the iSCSI session, and idle transfer resources are fully utilized, thereby improving the transfer rate of the iSCSI session.
Optionally, in some embodiments of the present invention, a load parameter value at the current time is obtained;
reducing the preset transmission rate requirement value under the condition that the load parameter value is larger than a preset value;
and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
The load parameter value represents a parameter value of the load degree of the system, the size of the load parameter value and the load degree are in positive correlation, when the load parameter value is larger than a preset value, the initiating end needs to reduce the session transmission rate of the iSCSI session, the transmission rate required value corresponding to the iSCSI session is reduced, so that the load degree of the system is reduced, and when the load parameter value is smaller than or equal to the preset value, the initiating end needs to improve the transmission rate of the iSCSI session, and the preset transmission rate required value is increased, so that the utilization rate of system transmission resources is improved. After changing the transmission rate requirement value of the iSCSI session, the transmission rate of the iSCSI session is adjusted to the adjusted transmission rate requirement value according to the method of the above embodiment.
Referring to fig. 5, a schematic structural diagram of a transmission rate control apparatus based on the iSCSI protocol according to an embodiment of the present invention is provided, which is hereinafter referred to as an apparatus for performing the transmission rate control method based on the iSCSI protocol shown in fig. 1, where the reference examples and terms may refer to the description in fig. 2. The device 5 comprises: an obtaining module 501, a first judging module 502 and an adjusting module 503.
An obtaining module 501, configured to obtain a session transmission rate of the iSCSI session at the current time.
A first determining module 502, configured to determine whether the session transmission rate acquired by the acquiring module is smaller than a preset transmission rate requirement value.
An adjusting module 503, configured to add a new TCP connection in the iSCSI session if the determination result of the first determining module is yes.
The embodiment of the present invention and the first method embodiment are based on the same concept, and the technical effects brought by the embodiment are also the same, and specific principles can refer to the description of the first method embodiment of fig. 2, which is not described herein again.
Optionally, the apparatus 5 further comprises: a first judging module.
A second judging module, configured to judge whether a session transmission rate of the iSCSI session at a current time is increased compared with a previous time,
and if the judgment result of the second judgment module is yes, indicating the first judgment module to start working.
Optionally, the obtaining module 501 is configured to:
determining a plurality of TCP connections comprised by said iSCSI session;
respectively calculating the TCP transmission rates of the plurality of TCP connections at the current moment according to the sequence numbers and the time stamps of at least two confirmation messages;
summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate S of the iSCSI session at the current momentn
Optionally, the apparatus 5 further comprises: and a smoothing module.
A smoothing module for smoothing according to formula α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, of the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the last moment.
Optionally, the apparatus 5 further comprises: and a speed reduction module.
The speed reduction module is used for judging whether the session transmission rate of the iSCSI session at the current moment is continuously reduced; wherein, the transmission rate requirement value corresponding to the iSCSI session is previously reduced from R1 to R2;
if so, removing the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate at the current moment and the T from the iSCSI session, and releasing the transmission resource occupied by the removed TCP connection; T-R1-R2.
Optionally, the speed reduction module is configured to:
judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session;
if so, the session transmission rate of the iSCSI session does not need to be reduced;
if not, reducing the session transfer rate of the iSCSI session.
Optionally, the apparatus 5 further comprises: and a threshold adjusting module.
The threshold value adjusting module is used for acquiring a load parameter value at the current moment; reducing the preset transmission rate requirement value under the condition that the load parameter value is larger than a preset value; and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
The embodiments of the present invention and the second and third method embodiments are based on the same concept, and the technical effects brought by the same concept are also the same, and specific principles can refer to the description of the embodiments of the method in fig. 3 and fig. 4, which are not described herein again.
Referring to fig. 6, another schematic diagram of a structure of a transmission rate control device based on the iSCSI protocol according to an embodiment of the present invention is shown, which is hereinafter referred to as a device for short, where the device 6 includes a processor 601, a memory 602, and a transceiver 603. The transceiver 603 is used for transmitting and receiving data to and from an external device. The number of processors 601 in the apparatus 6 may be one or more. In some embodiments of the invention, the processor 601, the memory 602, and the transceiver 603 may be connected by a bus system or other means. The apparatus 6 may be used to perform the method shown in fig. 2. With regard to the meaning and examples of the terms involved in the present embodiment, reference may be made to the embodiment corresponding to fig. 2. And will not be described in detail herein.
Wherein the memory 602 stores program code therein. The processor 601 is used to call the program code stored in the memory 602 for performing the following operations:
acquiring the session transmission rate of the iSCSI session at the current moment;
judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value;
if so, adding a new TCP connection in the iSCSI session.
In some embodiments of the present invention, before the determining whether the session transfer rate of the iSCSI session at the current time is less than the preset transfer rate requirement value, the processor 601 is further configured to:
determining whether a session transfer rate of the iSCSI session at a current time is increased compared to a previous time,
if so, executing the step of judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value.
In some embodiments of the present invention, the processor 601, executing the obtaining of the session transfer rate of the iSCSI session at the current time, includes:
determining a plurality of TCP connections comprised by said iSCSI session;
respectively calculating the TCP transmission rates of the plurality of TCP connections at the current moment according to the sequence numbers and the time stamps of at least two confirmation messages;
summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate S of the iSCSI session at the current momentn
In some embodiments of the present invention, the processor 601, after performing the obtaining of the session transfer rate of the iSCSI session at the current time, is further configured to perform:
according to the formula α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, of the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the last moment.
In some embodiments of the invention, the processor 601 is further configured to perform:
judging whether the session transmission rate of the iSCSI session at the current moment is continuously reduced; wherein, the transmission rate requirement value corresponding to the iSCSI session is previously reduced from R1 to R2;
if so, removing the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate at the current moment and the T from the iSCSI session, and releasing the transmission resource occupied by the removed TCP connection; T-R1-R2.
In some embodiments of the present invention, the processor 601, performing the determining whether the session transfer rate of the iSCSI session at the current time continues to decrease includes:
judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session;
if so, the session transmission rate of the iSCSI session does not need to be reduced;
if not, reducing the session transfer rate of the iSCSI session.
In some embodiments of the invention, the processor 601 is further configured to perform:
acquiring a load parameter value at the current moment;
reducing the preset transmission rate requirement value under the condition that the load parameter value is larger than a preset value;
and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A transmission rate control method based on iSCSI protocol is characterized by comprising the following steps:
acquiring the session transmission rate of an iSCSI session of an Internet small computer system interface at the current moment;
judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value;
if yes, adding a new Transmission Control Protocol (TCP) connection in the iSCSI session;
wherein the obtaining of the session transmission rate of the iSCSI session at the current moment comprises:
determining a plurality of TCP connections comprised by said iSCSI session;
respectively calculating the TCP transmission rates of the plurality of TCP connections at the current moment according to the sequence numbers and the time stamps of at least two confirmation messages;
summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate S of the iSCSI session at the current momentn
2. The method as in claim 1, wherein said determining whether the iSCSI session has a session transfer rate at the current time that is less than a predetermined transfer rate requirement value further comprises:
determining whether a session transfer rate of the iSCSI session at a current time is increased compared to a previous time,
if so, executing the step of judging whether the session transmission rate of the iSCSI session at the current moment is less than a preset transmission rate requirement value.
3. The method of claim 1, wherein obtaining the session transfer rate of the internet small computer system interface iSCSI session at the current time further comprises:
according to the formula α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, of the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the last moment.
4. The method of claim 1, further comprising:
judging whether the session transmission rate of the iSCSI session at the current moment is continuously reduced; wherein, the transmission rate requirement value corresponding to the iSCSI session is previously reduced from R1 to R2;
if so, removing the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate at the current moment and the T from the iSCSI session, and releasing the transmission resource occupied by the removed TCP connection; T-R1-R2.
5. The method as recited in claim 4, wherein said determining whether the session transfer rate of said iSCSI session continues to decrease at the current time comprises:
judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session;
if so, the session transmission rate of the iSCSI session does not need to be reduced;
if not, reducing the session transfer rate of the iSCSI session.
6. The method of any one of claims 1-5, further comprising:
acquiring a load parameter value at the current moment;
reducing the preset transmission rate requirement value under the condition that the load parameter value is larger than a preset value;
and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
7. A transmission rate control apparatus based on iSCSI protocol, comprising:
the acquisition module is used for acquiring the session transmission rate of the iSCSI session at the current moment;
the first judging module is used for judging whether the session transmission rate acquired by the acquiring module is smaller than a preset transmission rate required value or not;
the adjusting module is used for adding a new TCP connection in the iSCSI session if the judgment result of the first judging module is positive; wherein the acquisition module is configured to:
determining a plurality of TCP connections comprised by said iSCSI session;
respectively calculating the TCP transmission rates of the plurality of TCP connections at the current moment according to the sequence numbers and the time stamps of at least two confirmation messages;
summing the TCP transmission rates of the plurality of TCP connections at the current moment to obtain the session transmission rate S of the iSCSI session at the current momentn
8. The apparatus of claim 7, further comprising:
a second judging module, configured to judge whether a session transmission rate of the iSCSI session at a current time is increased compared with a previous time,
and if the judgment result of the second judgment module is yes, indicating the first judgment module to start working.
9. The apparatus of claim 7, further comprising:
a smoothing module for smoothing according to formula α × Sn-1+β×SnSmoothing the session transmission rate of the iSCSI session at the current moment, wherein α and β are constants larger than 0, α + β is 1, and S isnThe session transfer rate, S, of the iSCSI session at the current timen-1The session transfer rate of the iSCSI session at the last moment.
10. The apparatus of claim 7, further comprising:
the speed reduction module is used for judging whether the session transmission rate of the iSCSI session at the current moment is continuously reduced; wherein, the transmission rate requirement value corresponding to the iSCSI session is previously reduced from R1 to R2;
if so, removing the TCP connection with the minimum absolute value of the difference value between the TCP transmission rate at the current moment and the T from the iSCSI session, and releasing the transmission resource occupied by the removed TCP connection; T-R1-R2.
11. The apparatus of claim 10, wherein the speed reduction module is to:
judging whether the session transmission rate of the iSCSI session at the current moment is less than R2 or whether the difference value between the session transmission rate of the iSCSI session at the current moment and R2 is less than the TCP transmission rate of any TCP connection included in the iSCSI session;
if so, the session transmission rate of the iSCSI session does not need to be reduced;
if not, reducing the session transfer rate of the iSCSI session.
12. The apparatus of any one of claims 7-11, further comprising:
the threshold value adjusting module is used for acquiring a load parameter value at the current moment; reducing the preset transmission rate requirement value under the condition that the load parameter value is larger than a preset value; and increasing the preset transmission rate requirement value under the condition that the load parameter value is less than or equal to the preset value.
CN201510957174.1A 2015-12-18 2015-12-18 Transmission rate control method and device based on iSCSI protocol Active CN106899510B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510957174.1A CN106899510B (en) 2015-12-18 2015-12-18 Transmission rate control method and device based on iSCSI protocol
PCT/CN2016/110470 WO2017101875A1 (en) 2015-12-18 2016-12-16 Transmission rate control method and device based on iscsi protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510957174.1A CN106899510B (en) 2015-12-18 2015-12-18 Transmission rate control method and device based on iSCSI protocol

Publications (2)

Publication Number Publication Date
CN106899510A CN106899510A (en) 2017-06-27
CN106899510B true CN106899510B (en) 2020-04-03

Family

ID=59055782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510957174.1A Active CN106899510B (en) 2015-12-18 2015-12-18 Transmission rate control method and device based on iSCSI protocol

Country Status (2)

Country Link
CN (1) CN106899510B (en)
WO (1) WO2017101875A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110391953B (en) * 2018-04-19 2023-03-28 德科仕通信(上海)有限公司 Method for improving TCP KPI calculation accuracy
CN108880938A (en) * 2018-06-19 2018-11-23 成都网丁科技有限公司 A kind of end-to-end TCP session speed-measuring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448022A (en) * 2008-09-09 2009-06-03 创新科存储技术(深圳)有限公司 Control method of system interface iSCSI receiving end window of internet small computer and device
CN101483671A (en) * 2009-02-12 2009-07-15 杭州华三通信技术有限公司 Method, system and initial terminal apparatus for enhancing iSCSI session transmission rate
CN102281263A (en) * 2010-06-13 2011-12-14 杭州华三通信技术有限公司 Method for establishing Internet small computer system interface (iSCSI) session and iSCSI initiator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289509B2 (en) * 2002-02-14 2007-10-30 International Business Machines Corporation Apparatus and method of splitting a data stream over multiple transport control protocol/internet protocol (TCP/IP) connections
US7369570B2 (en) * 2003-03-03 2008-05-06 Nec Corporation iSCSI apparatus and communication control method for the same
EP1761852A2 (en) * 2004-05-11 2007-03-14 Mistletoe Technologies Inc. Semantic processor storage server architecture
CN101136929B (en) * 2007-10-19 2010-08-25 杭州华三通信技术有限公司 Internet small computer system interface data transmission method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448022A (en) * 2008-09-09 2009-06-03 创新科存储技术(深圳)有限公司 Control method of system interface iSCSI receiving end window of internet small computer and device
CN101483671A (en) * 2009-02-12 2009-07-15 杭州华三通信技术有限公司 Method, system and initial terminal apparatus for enhancing iSCSI session transmission rate
CN102281263A (en) * 2010-06-13 2011-12-14 杭州华三通信技术有限公司 Method for establishing Internet small computer system interface (iSCSI) session and iSCSI initiator

Also Published As

Publication number Publication date
WO2017101875A1 (en) 2017-06-22
CN106899510A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN109905259B (en) Communication connection maintaining method, system and related equipment
EP3614629B1 (en) Data-stream allocation method for link aggregation and related devices
CN106034084B (en) Data transmission method and device
WO2017050015A1 (en) Data transmission method and device and terminal
CN106685748B (en) Heartbeat information sending method, server and terminal
CN110620738B (en) Bandwidth allocation method, device, equipment and storage medium
CN104683259A (en) TCP congestion control method and device
CN106899510B (en) Transmission rate control method and device based on iSCSI protocol
CN105393590B (en) Terminal equipment and D2D resource management method
CN110460491B (en) RDMA (remote direct memory Access) -based performance test method and device
CN110581976B (en) Teleconferencing method, apparatus, computer system and readable storage medium
CN109274550B (en) iSCSI self-adaptive IO queue depth matching method
CN106101468B (en) Method and device for determining transmission link
CN113328906B (en) Flow real-time monitoring method and device, storage medium and electronic equipment
CN109756464B (en) Communication method, server and client
EP3360388A1 (en) Wireless data-acknowledgement communication using frame aggregation
JP2011172150A (en) Communication apparatus and communication system
US10819582B2 (en) Traffic optimization device and traffic optimization method
WO2017080363A1 (en) Data transmission method and wap device
CN109428901B (en) Message processing method and message processing device
CN105391712A (en) TCP-protocol-based burst data transmission method and apparatus
CN112714081A (en) Data processing method and device
CN108024350B (en) Dynamic time allocation method and device
CN112866133B (en) Method and device for acquiring MSS (maximum segment size)
JP4627290B2 (en) Rate control method, server, and program using TCP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant