CN103268298B - Exchange resource management method, device and memory device - Google Patents
Exchange resource management method, device and memory device Download PDFInfo
- Publication number
- CN103268298B CN103268298B CN201310192445.XA CN201310192445A CN103268298B CN 103268298 B CN103268298 B CN 103268298B CN 201310192445 A CN201310192445 A CN 201310192445A CN 103268298 B CN103268298 B CN 103268298B
- Authority
- CN
- China
- Prior art keywords
- request
- concurrent
- resource
- exchange
- value
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请公开了一种交换资源管理方法、装置及存储设备,其中,所述方法包括:分别获得发送和接收输入/输出IO请求所需的交换资源量;根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源。通过上述方式,本申请能够避免具备同口属性的存储设备的两种业务出现交换资源竞争,以及防止出现异常的业务对另一种业务的影响,提高可靠性。
The present application discloses a switching resource management method, device, and storage device, wherein the method includes: respectively obtaining the amount of switching resources required for sending and receiving input/output IO requests; The amount of resources is to allocate switching resources to the initiator resource module from the resource pool, and to allocate switching resources to the target resource module from the resource pool according to the amount of switching resources required for receiving the IO request. Through the above method, the present application can avoid the exchange resource competition between the two services of the storage device with the attribute of the same port, prevent the abnormal service from affecting the other service, and improve the reliability.
Description
技术领域technical field
本申请涉及光通信技术领域,特别是涉及一种交换资源管理方法、装置以及存储设备。The present application relates to the technical field of optical communication, and in particular to a switching resource management method, device and storage device.
背景技术Background technique
网络存储系统中,存储设备可通过光纤通道(FibreChannel,简称FC)与服务器或其他存储设备连接,实现服务器与存储设备的通信或存储设备间的数据共享。存储设备的FC端口同时具有启动器(Initiator,简称INI)属性和目标器(Target,简称TGT)属性,即具有同口属性,具有同口属性的FC端口既具有INI业务模式也具有TGT业务模式,可同时实现了双向通信业务,即既可以向远端设备发送输入/输出IO请求,也可接收并响应远端设备所发送的IO请求。In a network storage system, a storage device can be connected to a server or other storage device through a Fiber Channel (FC) to realize communication between the server and the storage device or data sharing between the storage devices. The FC port of the storage device has both the initiator (INI for short) attribute and the target (Target, TGT for short) attribute, that is, it has the same port attribute, and the FC port with the same port attribute has both the INI business mode and the TGT business mode , can realize the two-way communication service at the same time, that is, it can not only send input/output IO requests to the remote device, but also receive and respond to the IO request sent by the remote device.
存储设备在进行通信业务时,通过在资源池中分配交换(Exchange)资源记录该业务发起方端口标识(SourceIdentity,简称SID)、接收方端口标识(DestinationIdentity,简称DID)、发起方资源交换标识(OriginatorExchangeIdentity,简称OX_ID)以及接收方资源交换标识(ResponderExchangeIdentity,简称RX_ID)等,以实现对存储设备业务的管理,其中,所述资源池为设置于存储设备的存储端口内部的一组离散或连续的虚拟内存空间,用于存放交换空间数据结构。具体地,在存储设备发送或者接收IO请求时,存储设备驱动内部从资源池中分配交换资源,将该IO请求相关的SID、DID、OX_ID、RX_ID等信息更新到新分配的交换资源中,并将所述交换资源标识为使用状态,使得存储设备的其他业务无法使用所述交换资源。存储设备根据所述交换资源的信息完成该IO请求业务,直到存储设备接收到远端设备发送的响应或者完成对远端设备的响应后,即完成一次业务交互后,存储设备将所述交换资源标着为使用完成或未使用状态,并将所述交换资源释放到资源池,以供以后的业务使用。When the storage device performs communication services, it allocates exchange (Exchange) resources in the resource pool to record the service initiator port identifier (SourceIdentity, referred to as SID), receiver port identifier (DestinationIdentity, referred to as DID), initiator resource exchange identifier ( OriginatorExchangeIdentity, OX_ID for short) and ResponderExchangeIdentity, RX_ID for short, etc., to realize the management of storage device services, wherein the resource pool is a group of discrete or continuous storage ports set inside the storage device The virtual memory space is used to store the swap space data structure. Specifically, when the storage device sends or receives an IO request, the storage device driver internally allocates exchange resources from the resource pool, updates information such as SID, DID, OX_ID, and RX_ID related to the IO request to the newly allocated exchange resources, and The switching resource is marked as being in use, so that other services of the storage device cannot use the switching resource. The storage device completes the IO request service according to the exchange resource information, until the storage device receives the response sent by the remote device or completes the response to the remote device, that is, after completing a service interaction, the storage device transfers the exchange resource It is marked as used or unused, and the exchange resource is released to the resource pool for future business use.
在存储设备处于同口模式时,存储设备使用INI业务模块,主动向其他远端设备发送IO请求时,向资源池申请交换资源。同时,存储设备也可使用TGT业务模式,接收其他远端设备发送的IO请求,也向资源池申请交换资源。当存储设备同时运行INI和TGT两种业务模式时,则会出现交换资源竞争,影响双方业务的性能。具体地,一般存储设备的资源管理具有互斥锁性质,例如存储设备运行INI业务和TGT业务模式,均需要向资源池申请交换资源。此时,如果存储设备先为INI业务模式向资源池申请交换资源,则必须等待上述INI业务模式的交换资源申请完成,才能为上述TGT业务模式向资源池申请交换资源,从而影响TGT业务模式的性能。如果同口模式的存储设备的INI或者模式中任一种业务模式出现异常,例如存储设备运行INI业务模式发生异常,大量向资源池申请资源,导致资源池的资源耗尽。此时,虽然TGT业务模式是正常的,但由于资源池资源耗尽,使得运行TGT业务模式时无法申请交换资源,进而影响TGT业务模式的运行,最终导致双向业务模式均不可用,可靠性较低。When the storage device is in the same port mode, the storage device uses the INI service module to apply for exchange resources from the resource pool when actively sending IO requests to other remote devices. At the same time, the storage device can also use the TGT business model to receive IO requests sent by other remote devices, and also apply for exchange resources from the resource pool. When a storage device runs both INI and TGT service modes at the same time, there will be competition for switching resources, which will affect the performance of both services. Specifically, the resource management of a general storage device has the nature of a mutual exclusion lock. For example, a storage device running an INI service and a TGT service mode needs to apply for exchange resources from a resource pool. At this time, if the storage device first applies for exchange resources from the resource pool for the INI business model, it must wait for the completion of the application for the exchange resources of the above-mentioned INI business model before it can apply for the exchange resources from the resource pool for the above-mentioned TGT business model, thereby affecting the operation of the TGT business model. performance. If the INI or any of the business modes of the storage device in the same port mode is abnormal, for example, the INI business mode of the storage device is abnormal, and a large number of resources are applied to the resource pool, resulting in the exhaustion of resources in the resource pool. At this time, although the TGT business mode is normal, due to the exhaustion of resources in the resource pool, it is impossible to apply for exchange resources when running the TGT business mode, which affects the operation of the TGT business mode, and eventually causes the two-way business mode to be unavailable and less reliable. Low.
发明内容Contents of the invention
本发明实施例为解决现有技术存在的上述技术问题,提供一种交换资源管理方法、装置以及存储设备。In order to solve the above-mentioned technical problems existing in the prior art, embodiments of the present invention provide a switching resource management method, device, and storage device.
本发明实施例第一方面提供一种交换资源管理方法,包括:分别获得发送和接收输入/输出IO请求所需的交换资源量;根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源;其中,所述启动器资源模块的交换资源与所述目标器资源模块的交换资源相互独立,所述启动器资源模块用于提供所述发送IO请求所需的交换资源;所述目标器资源模块用于提供所述接收IO请求所需的交换资源;所述发送IO请求为向远端设备发送的IO请求,所述接收IO请求为接收远端设备发送的IO请求。The first aspect of the embodiments of the present invention provides a switching resource management method, including: respectively obtaining the amount of switching resources required for sending and receiving input/output IO requests; according to the amount of switching resources required for sending IO requests, Allocating exchange resources for the initiator resource module, and allocating exchange resources for the target resource module from the resource pool according to the amount of exchange resources required for receiving the IO request; wherein, the exchange resources of the initiator resource module and the The switching resources of the target resource module are independent of each other, the initiator resource module is used to provide the switching resources required for sending the IO request; the target resource module is used to provide the switching resources required for receiving the IO request; The sending IO request is an IO request sent to a remote device, and the receiving IO request is an IO request sent by a remote device.
结合第一方面,本发明实施例第一方面的第一种可能的实施方式中,所述分别获得发送和接收IO请求所需的交换资源量的步骤包括:在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,其中,所述发送IO请求并发次数为向远端设备发送IO请求的并发次数,所述接收IO请求并发次数为接收远端设备发送的IO请求的并发次数;根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值,将所述第一IO请求并发值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发值作为所述接收IO请求所需的交换资源量;其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值。With reference to the first aspect, in the first possible implementation manner of the first aspect of the embodiments of the present invention, the step of separately obtaining the amount of exchange resources required for sending and receiving IO requests includes: Counting the number of concurrent IO requests sent and the number of concurrent IO requests received, wherein the number of concurrent IO requests sent is the number of concurrent IO requests sent to the remote device, and the number of concurrent IO requests received is the number of times sent by the remote device. The number of concurrent IO requests; according to the statistical results within the preset first time period, the first IO request concurrent value and the second IO request concurrent value are obtained, and the exchange resources required by the first IO request concurrent value are obtained The amount is used as the exchange resource amount required for sending the IO request, and the second IO request concurrency value is used as the exchange resource amount required for receiving the IO request; wherein, the first IO request concurrency value is in the The maximum value of the number of concurrent sending IO requests that is counted within the preset first time period, and the second concurrent IO request value is the number of concurrent times of the receiving IO requests that is counted within the preset first time period The maximum value of the number of times, or the first IO request concurrent value is the average value of the sent IO request concurrent times counted in the preset first time, and the second IO request concurrent value is An average value of the concurrent times of receiving IO requests obtained through statistics within the preset first time period.
结合第一方面的第一种可能的实施方式,本发明实施例第一方面的第二种可能的实施方式中,所述根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源的步骤具体为:从所述资源池为所述启动器资源模块分配所述第一IO请求并发值所需的交换资源,从所述资源池为所述目标器资源模块分配所述第二IO请求并发值所需的交换资源。With reference to the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect of the embodiments of the present invention, according to the amount of switching resources required for sending the IO request, start from the resource pool The device resource module allocates switching resources, and according to the amount of switching resources required for receiving the IO request, the step of allocating switching resources for the target resource module from the resource pool is specifically: providing the initiator resource module from the resource pool Allocating the exchange resources required by the first IO request concurrency value, and allocating the exchange resources required by the second IO request concurrency value for the target resource module from the resource pool.
结合第一方面的第一种可能的实施方式,本发明实施例第一方面的第三种可能的实施方式中,所述根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源的步骤之后还包括:分别获得预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量,其中,所述第一溢出交换资源量为所述启动器资源模块缺少的交换资源量,所述第二溢出交换资源量为所述目标器资源模块缺少的交换资源量;根据所述第一溢出交换资源量,从所述资源池重新为所述启动器资源模块分配交换资源,根据所述第二溢出交换资源量,从所述资源池重新为所述目标器资源模块分配交换资源,以使所述启动器资源模块提供满足发送IO请求所需的交换资源以及使所述目标器资源模块提供满足接收IO请求所需的交换资源。With reference to the first possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect of the embodiments of the present invention, according to the amount of exchange resources required for sending the IO request, start from the resource pool The device resource module allocates switching resources, and according to the amount of switching resources required for receiving the IO request, after the step of allocating switching resources for the target resource module from the resource pool, it also includes: respectively obtaining the first time in the preset second time An amount of overflowing exchange resources and a second amount of overflowing exchange resources, wherein the first amount of overflowing exchange resources is the amount of exchange resources that the initiator resource module lacks, and the second amount of overflowing exchange resources is the amount of resources of the target The amount of exchange resources that the module lacks; according to the first amount of overflow exchange resources, re-allocate exchange resources for the initiator resource module from the resource pool, and according to the second amount of overflow exchange resources, re-allocate exchange resources from the resource pool Allocating switching resources to the target resource module, so that the initiator resource module provides switching resources required to satisfy sending IO requests and enables the target resource module to provide switching resources required to satisfy receiving IO requests.
结合第一方面,本发明实施例第一方面的第四种可能的实施方式中,所述分别获得发送和接收IO请求所需的交换资源量的步骤包括:在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计;根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值,其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值;重复N次所述在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,以获得N个所述第一IO请求并发值和N个所述第二IO请求并发值,根据获得的所述N个所述第一IO请求并发值获得第一IO请求并发平均值,根据获得的所述N个第二IO请求并发值获得第二IO请求并发平均值,将所述第一IO请求并发平均值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发平均值所需的交换资源量作为所述接收IO请求所需的交换资源量,其中N为自然数。With reference to the first aspect, in the fourth possible implementation manner of the first aspect of the embodiments of the present invention, the step of respectively obtaining the amount of exchange resources required for sending and receiving IO requests includes: Counting the number of concurrent IO requests sent and the concurrent number of received IO requests; according to the statistical results within the preset first time period, obtaining a first concurrent IO request value and a second concurrent IO request value, wherein the first An IO request concurrency value is the maximum value of the number of sending IO request concurrency times counted within the preset first time period, and the second IO request concurrency value is within the preset first time period The maximum value of the number of concurrent received IO requests obtained by statistics, or the first concurrent IO request value is the average value of the number of concurrent times of sent IO requests obtained by statistics within the preset first time, The second IO request concurrency value is the average value of the received IO request concurrency times counted within the preset first time; repeat N times and send IO requests respectively within the preset first time The number of concurrent requests and the number of concurrent received IO requests are counted to obtain N concurrent values of the first IO requests and N concurrent values of the second IO requests. value to obtain the first IO request concurrent average value, obtain the second IO request concurrent average value according to the obtained N second IO request concurrent value, and use the amount of exchange resources required for the first IO request concurrent average value as the required The amount of exchange resources required for sending an IO request, and the amount of exchange resources required for the second IO request concurrent average value is used as the amount of exchange resources required for receiving an IO request, where N is a natural number.
本发明实施例第二方面提供一种交换资源管理装置,包括启动器资源模块、目标器资源模块、获取模块以及第一分配模块;所述获取模块用于分别获取发送和接收输入/输出IO请求所需的交换资源量,并将所述发送和接收IO请求所需的交换资源量发送给所述第一分配模块;所述第一分配模块用于根据所述发送IO请求所需的交换资源量,从资源池为所述启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为所述目标器资源模块分配交换资源;所述启动器资源模块用于提供所述发送IO请求所需的交换资源,所述发送IO请求为向远端设备发送的IO请求;所述目标器资源模块用于提供所述接收IO请求所需的交换资源,所述接收IO请求为接收远端设备发送的IO请求;所述启动器资源模块的交换资源与所述目标器资源模块的交换资源相互独立。The second aspect of the embodiment of the present invention provides a switching resource management device, including an initiator resource module, a target resource module, an acquisition module, and a first allocation module; the acquisition module is used to respectively acquire and send and receive input/output IO requests The amount of exchange resources required, and send the amount of exchange resources required for sending and receiving the IO request to the first allocation module; the first allocation module is used to send the exchange resources required for the IO request amount, allocate switching resources for the initiator resource module from the resource pool, and allocate switching resources for the target resource module from the resource pool according to the amount of switching resources required for receiving the IO request; the initiator resource The module is used for providing the exchange resources required for sending the IO request, the sending IO request is an IO request sent to the remote device; the target resource module is used for providing the exchange resources required for receiving the IO request, The receiving IO request is receiving an IO request sent by a remote device; the switching resources of the initiator resource module and the switching resources of the target resource module are independent of each other.
结合第二方面,本发明实施例第二方面的第一种可能的实施方式中,第一统计单元及第一计算单元;所述第一统计单元用于在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,并将统计结果发送给所述第一计算单元,其中,所述发送IO请求并发次数为向远端设备发送IO请求的并发次数,所述接收IO请求并发次数为接收远端设备发送的IO请求的并发次数;所述第一计算单元用于根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值,将所述第一IO请求并发值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发值作为所述接收IO请求所需的交换资源量;其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值。With reference to the second aspect, in the first possible implementation manner of the second aspect of the embodiments of the present invention, the first statistical unit and the first calculation unit; the first statistical unit is used to respectively calculate The number of concurrent IO requests sent and the number of concurrent IO requests received are counted, and the statistical results are sent to the first calculation unit, wherein the number of concurrent IO requests sent is the number of concurrent IO requests sent to the remote device, and the The number of concurrent IO requests received is the number of concurrent IO requests sent by the remote device; the first calculation unit is used to obtain the first IO request concurrent value and the second Two IO request concurrency values, using the amount of exchange resources required for the first IO request concurrency value as the exchange resource amount required for sending the IO request, and using the second IO request concurrency value as the amount of exchange resources required for the receiving IO request The amount of exchange resources required; wherein, the first IO request concurrency value is the maximum value of the sending IO request concurrency times counted in the preset first time, and the second IO request concurrency value is is the maximum value of the number of concurrent received IO requests that is counted within the preset first time, or the first concurrent IO request value is counted within the preset first time The average value of the concurrent times of sending IO requests, and the second concurrent value of IO requests is the average value of the number of concurrent times of receiving IO requests obtained through statistics within the preset first time period.
结合第二方面的第一种可能的实施方式,本发明实施例第二方面的第二种可能的实施方式中,所述第一分配模块具体用于从所述资源池为所述启动器资源模块分配所述第一IO请求并发值所需的交换资源,从所述资源池为所述目标器资源模块分配所述第二IO请求并发值所需的交换资源。With reference to the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect of the embodiments of the present invention, the first allocation module is specifically configured to provide the initiator resources from the resource pool The module allocates the exchange resources required by the first IO request concurrency value, and allocates the exchange resources required by the second IO request concurrency value for the target resource module from the resource pool.
结合第二方面的第一种可能的实施方式,本发明实施例第二方面的第三种可能的实施方式中,还包括第二分配模块;所述第二分配模块用于分别获得预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量,根据所述第一溢出交换资源量,从所述资源池重新为所述启动器资源模块分配交换资源,根据所述第二溢出交换资源量,从所述资源池重新为所述目标器资源模块分配交换资源,以使所述启动器资源模块提供满足发送IO请求所需的交换资源以及使所述目标器资源模块提供满足接收IO请求所需的交换资源,其中,所述第一溢出交换资源量为所述启动器资源模块缺少的交换资源量,所述第二溢出交换资源量为所述目标器资源模块缺少的交换资源量。With reference to the first possible implementation manner of the second aspect, the third possible implementation manner of the second aspect of the embodiment of the present invention further includes a second distribution module; the second distribution module is used to respectively obtain preset According to the first amount of overflowing exchange resources and the second amount of overflowing exchange resources in the second time, re-allocate exchange resources for the initiator resource module from the resource pool according to the first amount of overflowing exchange resources, and according to the second amount of overflowing exchange resources, 2. The amount of exchange resources is overflowed, re-allocating exchange resources for the target resource module from the resource pool, so that the initiator resource module provides the exchange resources required to meet the sending IO request and the target resource module provides To meet the exchange resources required for receiving IO requests, the first overflow exchange resource amount is the exchange resource amount lacking in the initiator resource module, and the second overflow exchange resource amount is the target resource module lacking amount exchange resources.
结合第二方面,本发明实施例第二方面的第四种可能的实施方式中,所述获取模块包括第二统计单元及第二计算单元;所述第二统计单元用于在N个预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,并将所述N个预设的第一时间内的统计结果发送给所述第二计算单元;所述第二计算单元用于分别根据所述N个预设的第一时间内的统计结果,获得N个第一IO请求并发值和N个第二IO请求并发值,根据获得的所述N个所述第一IO请求并发值获得第一IO请求并发平均值,根据获得的所述N个第二IO请求并发值获得第二IO请求并发平均值,将所述第一IO请求并发平均值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发平均值作为所述接收IO请求所需的交换资源量;其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值,其中N为自然数。With reference to the second aspect, in the fourth possible implementation manner of the second aspect of the embodiments of the present invention, the acquisition module includes a second statistical unit and a second calculation unit; the second statistical unit is used to calculate The number of concurrent IO requests sent and the concurrent number of IO requests received within the first time period are respectively counted, and the statistical results of the N preset first time periods are sent to the second calculation unit; the second The calculation unit is used to obtain N first IO request concurrent values and N second IO request concurrent values respectively according to the statistical results of the N preset first time periods, and obtain the N first concurrent IO request values according to the obtained N first Obtain the first IO request concurrency average value for one IO request concurrency value, obtain the second IO request concurrency average value according to the obtained N second IO request concurrency values, and exchange the first IO request concurrency average value The resource amount is used as the exchange resource amount required for sending the IO request, and the second IO request concurrent average value is used as the exchange resource amount required for the receiving IO request; wherein, the first IO request concurrent value is in The maximum value of the number of concurrent sending IO requests that is counted within the preset first time period, and the second concurrent IO request value is the number of received IO requests counted within the preset first time period The maximum value of the number of concurrency requests, or the first IO request concurrency value is the average value of the number of concurrent IO requests sent in the preset first time, and the second IO request concurrency The value is an average value of the concurrent times of receiving IO requests obtained through statistics within the preset first time period, where N is a natural number.
本发明实施例第三方面提供一种存储设备,包括上述任一项的交换资源管理装置。A third aspect of the embodiments of the present invention provides a storage device, including any one of the switching resource management apparatuses above.
本发明实施例根据发送和接收IO请求所需的资源量,从资源池分别为相互独立的启动器资源模块和目标器资源模块分配交换资源,且所述启动器资源模块用于提供所述发送IO请求所需的交换资源;所述目标器资源模块用于提供所述接收IO请求所需的交换资源,使得INI和TGT两种业务模式的交换资源相互独立,避免了同口模式中INI业务模式和TGT业务模式出现交换资源竞争。同时,在其中一种业务出现异常,导致对应的资源模块交换资源耗尽时,也不会影响另一种业务交换资源的申请,使得另一种业务能够正常运行,提高了存储设备的可靠性。In the embodiment of the present invention, according to the amount of resources required for sending and receiving IO requests, exchange resources are allocated from the resource pool to the mutually independent initiator resource module and target resource module, and the initiator resource module is used to provide the sending The exchange resources required for IO request; the target device resource module is used to provide the exchange resources required for receiving the IO request, so that the exchange resources of the two business modes of INI and TGT are independent of each other, avoiding the INI business in the same port mode Mode and TGT business mode have exchange resource competition. At the same time, when one of the services is abnormal and the exchange resources of the corresponding resource modules are exhausted, it will not affect the application for exchange resources of the other service, so that the other service can run normally and improve the reliability of the storage device. .
附图说明Description of drawings
图1是本申请存储设备一实施方式的结构示意图;FIG. 1 is a schematic structural diagram of an embodiment of a storage device of the present application;
图2是本申请交换资源管理方法一实施方式的流程图;FIG. 2 is a flow chart of an embodiment of the exchange resource management method of the present application;
图3是本申请交换资源管理方法另一实施方式的流程图;FIG. 3 is a flow chart of another embodiment of the exchange resource management method of the present application;
图4是本申请交换资源管理装置一实施方式的结构示意图;FIG. 4 is a schematic structural diagram of an embodiment of an exchange resource management device according to the present application;
图5是本申请交换资源管理装置另一实施方式的结构示意图;FIG. 5 is a schematic structural diagram of another embodiment of an exchange resource management device according to the present application;
图6是本申请交换资源管理装置再一实施方式的结构示意图;FIG. 6 is a schematic structural diagram of yet another embodiment of an exchange resource management device according to the present application;
图7是是申请交换资源管理装置又再一实施方式的结构示意图。Fig. 7 is a schematic structural diagram of yet another embodiment of an application exchange resource management device.
具体实施方式detailed description
下面结合附图和具体的实施方式进行说明。The following description will be made in conjunction with the accompanying drawings and specific implementation manners.
请参阅图1,图1是本申请存储设备一实施方式的结构示意图。存储设备包括资源池110、启动器资源模块120以及目标器资源模块130。Please refer to FIG. 1 . FIG. 1 is a schematic structural diagram of an embodiment of a storage device of the present application. The storage device includes a resource pool 110 , an initiator resource module 120 and a target resource module 130 .
在网络存储系统中,所述存储设备可运行INI业务模式,向远端设备(如其他存储设备或者服务器)发送IO请求,或者运行TGT业务模式,接收并响应远端设备IO请求。所述存储设备在向远端设备(图未示)发送IO请求,申请交换资源以记录INI业务模式的SID、DID、OX_ID及RX_ID等,或者接收到远端设备IO请求,申请交换资源以记录TGT业务模式的SID、DID、OX_ID及RX_ID等,在INI或TGT业务运行期间,存储设备通过所述交换资源中的信息,实现与正确的远端设备进行通信。In the network storage system, the storage device can run INI business mode to send IO requests to remote devices (such as other storage devices or servers), or run TGT business mode to receive and respond to remote device IO requests. The storage device is sending an IO request to a remote device (not shown in the figure), applying for an exchange resource to record the SID, DID, OX_ID, and RX_ID of the INI business model, or receiving an IO request from a remote device, and applying for an exchange resource to record For the SID, DID, OX_ID, and RX_ID of the TGT service mode, during the operation of the INI or TGT service, the storage device communicates with the correct remote device through the information in the exchange resource.
所述存储设备的资源池110用于存放交换资源,并为启动器资源模块120和目标器资源模块130分配交换资源。具体地,所述存储设备获得存储设备发送和接收IO请求所需的交换资源量,根据所述发送IO请求所需的交换资源量,从资源池110为启动器资源模块120,根据所述接收IO请求所需的交换资源量,从资源池110为目标器资源模块130分配交换资源。例如,存储设备获取预设第一时间内发送IO请求并发次数和接收IO请求并发次数,以分别获得发送IO请求并发次数和接收IO请求并发次数分别所需的交换资源量,并从资源池110为启动器资源模块120分配所述发送IO请求并发次数所需的交换资源,为目标器资源模块130分配所述接收IO请求并发次数所需的交换资源。The resource pool 110 of the storage device is used to store switching resources and allocate switching resources to the initiator resource module 120 and the target resource module 130 . Specifically, the storage device obtains the amount of exchange resources required by the storage device to send and receive the IO request, and according to the amount of exchange resources required for sending the IO request, from the resource pool 110 to the initiator resource module 120, according to the received The IO requests the amount of switching resources required, and allocates switching resources to the target resource module 130 from the resource pool 110 . For example, the storage device acquires the number of concurrently sent IO requests and the number of concurrently received IO requests in the preset first time, so as to obtain the amount of exchange resources required for the number of concurrently sent IO requests and the number of concurrently received IO requests respectively, and obtains the amount of exchange resources from the resource pool 110 The initiator resource module 120 is allocated the exchange resources required for sending the number of concurrent IO requests, and the target resource module 130 is allocated the exchange resources required for receiving the number of concurrent IO requests.
所述启动器资源模块120用于提供存储设备向远端设备发送IO请求所需的交换资源,即启动器资源模块120存放的交换资源仅用于INI业务模式。所述目标器资源模块130用于提供接收远端设备发送的IO请求所需的交换资源,即目标器资源模块130存放的交换资源仅用于TGT业务模式。The initiator resource module 120 is used to provide the exchange resources required by the storage device to send IO requests to the remote device, that is, the exchange resources stored in the initiator resource module 120 are only used in the INI business mode. The target resource module 130 is used to provide exchange resources required for receiving the IO request sent by the remote device, that is, the exchange resources stored in the target resource module 130 are only used in the TGT business mode.
所述存储设备在向远端设备发送IO请求(需要运行INI业务模式)时,优先向启动器资源模块120申请交换资源,在接收到远端设备所发送的IO请求(需要运行TGT业务模式)时,优先向目标器资源模块130申请交换资源。存储设备申请到交换资源后,即可与所述远端设备进行INI或TGT业务的交互。在该业务完成后,存储设备将该业务占用的交换资源释放到对应的资源模块,即启动器资源模块120或目标器资源模块130。When the storage device sends an IO request to the remote device (needs to run the INI business mode), it first applies to the initiator resource module 120 for switching resources, and receives the IO request sent by the remote device (needs to run the TGT business mode) , preferentially apply to the target resource module 130 for exchange resources. After the storage device applies for switching resources, it can interact with the remote device for INI or TGT services. After the service is completed, the storage device releases the switching resource occupied by the service to the corresponding resource module, that is, the initiator resource module 120 or the target resource module 130 .
如果存储设备向启动器资源模块120或者目标器资源模块130申请不到交换资源,则存储设备向资源池110申请交换资源。如果存储设备向资源池110申请到交换资源,则与所述远端设备进行该业务的交互,并在该业务完成后,将该业务的交换资源释放回资源池110。如果存储设备向资源池110申请不到交换资源,则返回申请不到交换资源的信息,此时,存储设备无法与所述远端设备进行该业务的交互,出现异常。If the storage device fails to apply for the exchange resource from the initiator resource module 120 or the target resource module 130 , the storage device applies to the resource pool 110 for the exchange resource. If the storage device applies for switching resources from the resource pool 110, it interacts with the remote device for the service, and releases the switching resources of the service back to the resource pool 110 after the service is completed. If the storage device cannot apply for exchange resources from the resource pool 110, it will return information that it cannot apply for exchange resources. At this time, the storage device cannot interact with the remote device for the service, and an exception occurs.
本申请实施方式根据发送IO请求所需的资源量,从资源池为启动器资源模块分配交换资源,根据接收IO请求所需的资源量为目标器资源模块分配交换资源,启动器资源模块和目标器资源模块的交换资源相互独立,且INI业务模式所需的交换资源由所述启动器资源模块提供,TGT业务模式所需的交换资源由目标器资源模块提供,使得INI和TGT两种业务模式的交换资源相互独立,避免了同口模式中INI业务模式和TGT业务模式出现交换资源竞争。同时,在其中一种业务出现异常,导致对应的资源模块交换资源耗尽时,也不会影响另一种业务交换资源的申请,使得另一种业务能够正常运行,提高了存储设备的可靠性。The embodiment of the present application allocates exchange resources for the initiator resource module from the resource pool according to the amount of resources required for sending IO requests, and allocates exchange resources for the target resource module according to the amount of resources required for receiving IO requests. The initiator resource module and the target The switching resources of the device resource module are independent of each other, and the switching resources required by the INI business mode are provided by the initiator resource module, and the switching resources required by the TGT business mode are provided by the target device resource module, so that the two business modes of INI and TGT The switching resources are independent of each other, which avoids the competition of switching resources in the INI business mode and the TGT business mode in the same port mode. At the same time, when one of the services is abnormal and the exchange resources of the corresponding resource modules are exhausted, it will not affect the application for exchange resources of the other service, so that the other service can run normally and improve the reliability of the storage device. .
请参阅图2,图2是本申请交换资源管理方法一实施方式的流程图。所述交换资源管理方法包括以下步骤:Please refer to FIG. 2 . FIG. 2 is a flow chart of an embodiment of a method for managing exchange resources in this application. The exchange resource management method includes the following steps:
步骤S201:存储设备分别获得发送和接收IO请求所需的交换资源量。Step S201: the storage device respectively obtains the amount of switching resources required for sending and receiving IO requests.
存储设备具有同口属性,可运行INI及TGT业务模式。存储设备在运行INI业务模式时,向远端设备发送IO请求,并申请交换资源,在运行TGT业务模式时,接收远端设备所发送的IO请求,并申请交换资源。存储设备分别获得存储设备发送和接收IO请求所需的交换资源量。例如,存储设备分别获得发送IO请求并发次数和接收IO请求并发次数,并将发送IO请求并发次数所需的交换资源量作为发送IO请求所需的交换资源量,将接收IO请求并发次数所需的交换资源量作为接收IO请求所需的交换资源量。其中,所述发送IO请求并发次数为在预设时间内,存储设备向远端设备发送IO请求的次数。所述接收IO请求并发次数为预设时间内,存储设备接收到远端设备所发送的IO请求的次数。本发明实施例中的预设时间可以根据具体实施情况进行设定,本发明对此不作具体限定。The storage device has the property of the same port and can run INI and TGT business modes. When the storage device runs the INI business mode, it sends an IO request to the remote device and applies for exchange resources. When it runs the TGT business mode, it receives the IO request sent by the remote device and applies for exchange resources. The storage device respectively obtains the amount of exchange resources required by the storage device for sending and receiving IO requests. For example, the storage device obtains the number of concurrent IO requests sent and the number of concurrent IO requests received, and takes the amount of exchange resources required for sending IO requests concurrently as the amount of exchange resources required for sending IO requests, and uses the amount of exchange resources required for the number of concurrent IO requests received as The amount of exchange resources is used as the amount of exchange resources required to receive IO requests. Wherein, the number of concurrent IO requests sent is the number of times the storage device sends IO requests to the remote device within a preset time. The number of concurrent IO requests received is the number of times the storage device receives IO requests sent by the remote device within a preset time. The preset time in the embodiment of the present invention may be set according to specific implementation conditions, which is not specifically limited in the present invention.
步骤S202:存储设备根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源。Step S202: The storage device allocates switching resources for the initiator resource module from the resource pool according to the amount of switching resources required for sending the IO request, and allocates switching resources for the initiator resource module from the resource pool according to the amount of switching resources required for receiving the IO request. The server resource module allocates switching resources.
所述存储设备设置有资源池、启动器资源模块和目标器资源模块。其中,所述资源池存放存储设备总的交换资源,并且为所述启动器资源模块和所述目标器资源模块提供交换资源。所述启动器资源模块与目标器资源模块的交换资源相互独立。The storage device is provided with a resource pool, an initiator resource module and a target resource module. Wherein, the resource pool stores the total exchange resources of the storage device, and provides exchange resources for the initiator resource module and the target resource module. The exchange resources of the initiator resource module and the target resource module are independent of each other.
所述存储设备根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源。例如,存储设备分别获得发送和接收IO请求并发次数所需的交换资源量,从资源池为启动器资源模块分配发送IO请求并发次数所需的交换资源,为目标器资源模块分配接收IO请求并发次数所需的交换资源。其中,分配给所述启动器资源模块的交换资源与分配给所述目标器资源模块的交换资源相互独立。所述启动器资源模块存放的交换资源仅用于INI业务模式,在存储设备向远端设备发送IO请求时,为所述存储设备提供交换资源。所述目标器资源模块存放的交换资源仅用于TGT业务模式,在存储设备接收到远端设备发送的IO请求时,为所述存储设备提供交换资源。The storage device allocates switching resources for the initiator resource module from the resource pool according to the amount of switching resources required for sending the IO request, and allocates switching resources for the target module from the resource pool according to the amount of switching resources required for receiving the IO request. The resource module allocates exchange resources. For example, the storage device obtains the amount of exchange resources required for sending and receiving concurrent IO requests, allocates the exchange resources required for sending concurrent IO requests to the initiator resource module from the resource pool, and assigns the exchange resources required for receiving concurrent IO requests to the target resource module. The number of swap resources required. Wherein, the switching resources allocated to the initiator resource module and the switching resources allocated to the target resource module are independent of each other. The switching resources stored in the initiator resource module are only used in the INI business mode, and provide switching resources for the storage device when the storage device sends an IO request to the remote device. The switching resources stored in the target resource module are only used in the TGT business mode, and provide switching resources for the storage device when the storage device receives an IO request sent by the remote device.
存储设备从资源池中分别为所述启动器资源模块和目标器资源模块分配交换资源后,如果存储设备向远端设备发送IO请求,则向所述启动器资源模块申请交换资源,如果存储设备接收到远端设备所发送的IO请求,则优先向所述目标器资源模块申请交换资源。存储设备向启动器资源模块或目标器资源模块申请到交换资源后,即可与所述远端设备进行通信。在INI或TGT业务完成后,存储设备将该业务占用的交换资源释放到对应的资源模块,即启动器资源模块或目标器资源模块。如果存储设备向启动器资源模块或者目标器资源模块申请不到交换资源,则存储设备向资源池申请交换资源。如果存储设备向资源池申请到交换资源,则与所述远端设备进行通信,并在该业务完成后,将该业务的交换资源释放回资源池。如果存储设备向资源池申请不到交换资源,则返回申请不到交换资源的信息,此时,存储设备无法与所述远端设备进行通信,出现异常。After the storage device allocates exchange resources for the initiator resource module and the target resource module respectively from the resource pool, if the storage device sends an IO request to the remote device, it applies for the exchange resource to the initiator resource module, and if the storage device After receiving the IO request sent by the remote device, apply for switching resources to the target resource module first. After the storage device applies for exchange resources from the initiator resource module or the target resource module, it can communicate with the remote device. After the INI or TGT service is completed, the storage device releases the switching resource occupied by the service to the corresponding resource module, that is, the initiator resource module or the target resource module. If the storage device cannot apply for the exchange resource from the initiator resource module or the target resource module, the storage device applies for the exchange resource from the resource pool. If the storage device applies for switching resources from the resource pool, it communicates with the remote device, and after the service is completed, releases the switching resources of the service back to the resource pool. If the storage device fails to apply for the exchange resource from the resource pool, it returns information that the exchange resource cannot be applied for. At this time, the storage device cannot communicate with the remote device, and an exception occurs.
请参阅图3,图3是本申请交换资源管理方法另一实施方式的流程图。所述交换资源管理方法包括以下步骤:Please refer to FIG. 3 . FIG. 3 is a flow chart of another embodiment of the exchange resource management method of the present application. The exchange resource management method includes the following steps:
步骤S301:存储设备在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计。Step S301: The storage device counts the number of concurrently sent IO requests and the number of concurrently received IO requests within a preset first time period.
存储设备在预设的第一时间内分别对发送IO请求并发次数以及接收IO请求并发次数进行统计,其中,所述发送IO请求并发次数为向远端设备发送的IO请求的并发次数,即在预定时间内,存储设备向远端设备发送的IO请求的次数。所述接收IO请求并发次数为接收到远端设备所发送的IO请求的并发次数,即预设时间内,存储设备接收到远端设备所发送的IO请求的次数。例如,所述预设的第一时间为10秒(S),存储设备分别获得第1、第2、第3……第10秒内存储设备向远端设备发送的IO请求的次数和接收到远端设备所发送的IO请求的次数。本例中,存储设备每秒向远端设备发送的IO请求的次数即为所述发送IO请求并发次数,存储设备每秒接收到远端设备所发送的IO请求的次数即为所述接收IO请求并发次数。当然,存储设备未必统计预设第一时间内所有发送和接收IO请求并发次数,在其他实施方式中,存储设备还可对预设的第一时间内的发送和接收IO请求并发次数进行抽样统计,在此不作限定,本发明实施例中的预设时间以及预定的第一时间可以根据具体实施情况进行设定,本发明对此不作具体限定。The storage device separately counts the number of concurrent IO requests sent and the number of concurrent received IO requests within the preset first time period, wherein the number of concurrent IO requests sent is the number of concurrent IO requests sent to the remote device, that is, in The number of IO requests sent by the storage device to the remote device within a predetermined period of time. The number of concurrent received IO requests is the number of concurrent received IO requests sent by the remote device, that is, the number of times the storage device receives the IO requests sent by the remote device within a preset period of time. For example, the preset first time is 10 seconds (S), and the storage device respectively obtains the number of IO requests sent by the storage device to the remote device and the received The number of IO requests sent by the remote device. In this example, the number of IO requests sent by the storage device to the remote device per second is the number of concurrent IO requests sent, and the number of times the storage device receives IO requests sent by the remote device per second is the number of received IO requests. The number of concurrent requests. Of course, the storage device does not necessarily count all the concurrent times of sending and receiving IO requests within the preset first time period. In other implementation manners, the storage device may also perform sampling statistics on the number of concurrent sending and receiving IO requests within the preset first time period. , which is not limited here, the preset time and the predetermined first time in the embodiment of the present invention may be set according to specific implementation conditions, and the present invention does not specifically limit this.
步骤S302:存储设备根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值。Step S302: The storage device obtains a first IO request concurrency value and a second IO request concurrency value according to the statistical results within the preset first time period.
存储设备根据在所述预设的第一时间内对发送IO请求并发次数的统计结果,获得第一IO请求并发值,在所述预设的第一时间内对接收IO请求并发次数的统计结果,获得第二IO请求并发值。并且,存储设备将第一IO请求并发值及第二IO请求并发值保存在存储设备的内存中。其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值。The storage device obtains the first IO request concurrency value according to the statistical result of the number of concurrent IO requests sent within the first preset time, and the statistical result of the number of concurrent IO requests received within the first preset time , to obtain the second IO request concurrency value. And, the storage device saves the first IO request concurrency value and the second IO request concurrency value in the memory of the storage device. Wherein, the first IO request concurrency value is the maximum value among the number of sending IO request concurrency times counted within the preset first time period, and the second IO request concurrency value is within the preset first time. The maximum value of the number of concurrent times of receiving IO requests obtained through statistics within a period of time, or the first concurrent number of IO requests is the average value of the number of times of concurrent times of sending IO requests obtained through statistics within the preset first time period The second IO request concurrent value is an average value of the received IO request concurrent times obtained through statistics within the preset first time period.
具体应用中,存储设备可根据统计结果,以选择将在所述预设的第一时间内统计得到的发送IO请求并发次数的最大值作为所述第一IO请求并发值,将在所述预设的第一时间内统计得到的接收IO请求并发次数的最大值作为第二IO请求并发值,或者选择将在所述预设的第一时间内统计得到的发送IO请求并发次数的平均值作为所述第一IO请求并发值,将在所述预设的第一时间内统计得到的接收O请求并发次数的平均值作为第二IO请求并发值。如果存储设备运行的业务并发量比较不稳定,在预设的第一时间内发送或接收IO请求并发次数间相差较大,为保证存储设备分配的交换资源尽可能地满足发送或接收IO请求并发次数所需,存储设备将在所述预设的第一时间内统计得到的发送IO请求并发次数中的最大值作为第一IO请求并发值,将接收IO请求并发次数中的最大值作为第二IO请求并发值。如果存储设备运行的业务并发量比较稳定,在预设的第一时间内发送或接收IO请求并发次数间变化不大,则存储设备可将预设的第一时间内发送IO请求并发次数的平均值作为第一IO请求并发值,或接收IO请求并发次数的平均值作为第二IO请求并发值。In a specific application, the storage device may select the maximum value of the number of concurrent IO requests sent within the preset first time period as the first concurrent IO request value according to the statistical results, and will Set the maximum value of the number of concurrent received IO requests counted within the first time as the second concurrent IO request value, or choose to use the average value of the number of concurrent sent IO requests counted within the preset first time as The first concurrent IO request value is the second concurrent concurrent IO request value, which is the average value of the number of concurrent received IO requests obtained through statistics within the preset first time period. If the concurrency of services running on the storage device is relatively unstable, and the number of concurrent IO requests sent or received within the preset first time varies greatly, in order to ensure that the exchange resources allocated by the storage device meet the concurrency of sending or receiving IO requests as much as possible If the number of times is required, the storage device will use the maximum value of the number of concurrent IO requests sent and obtained in the preset first time as the first concurrent number of IO requests, and the maximum value of the concurrent times of received IO requests as the second value. IO request concurrency value. If the number of concurrent services running on the storage device is relatively stable, and the number of concurrent IO requests sent or received within the preset first time does not change much, the storage device can use the average number of concurrent IO requests sent or received within the preset first time. The value is used as the first IO request concurrent value, or the average value of received IO request concurrent times is used as the second IO request concurrent value.
步骤S303:存储设备获得N个第一IO请求并发值和N个第二IO请求并发值,根据获得的N个所述第一IO请求并发值获得第一IO请求并发平均值,根据获得的所述N个第二IO请求并发值获得第二IO请求并发平均值,将第一IO请求并发平均值所需的交换资源量作为发送IO请求所需的交换资源量,将第二IO请求并发平均值所需的交换资源量作为接收IO请求所需的交换资源量。其中,N为自然数,N的具体取值可以根据具体实际情况进行确定,本发明实施例对此不作具体限定。Step S303: The storage device obtains N first IO request concurrent values and N second IO request concurrent values, obtains the first IO request concurrent average value according to the obtained N first IO request concurrent values, and obtains the first IO request concurrent value according to the obtained Obtain the second IO request concurrency average value for the N second IO request concurrency values, use the exchange resource amount required for the first IO request concurrency average value as the exchange resource amount required for sending IO requests, and use the second IO request concurrency average value The amount of exchange resources required for the value is used as the amount of exchange resources required to receive IO requests. Wherein, N is a natural number, and the specific value of N may be determined according to specific actual conditions, which is not specifically limited in this embodiment of the present invention.
存储设备重复上述步骤S301和步骤S302,以获取在N个第一IO请求并发值和N个第二IO请求并发值,并根据N个第一IO请求并发值,计算获得第一IO请求并发平均值,根据N个第二IO请求并发值,计算获得第二IO请求并发平均值。其中,所述第一IO请求并发平均值为所述N个第一IO请求并发值的平均值,第二IO请求并发平均值为所述N个第二IO请求并发值的平均值。The storage device repeats the above steps S301 and S302 to obtain the N first IO request concurrent values and the N second IO request concurrent values, and calculate and obtain the first IO request concurrent average according to the N first IO request concurrent values value, according to the N second IO request concurrency value, calculate and obtain the second IO request concurrency average. Wherein, the first IO request concurrent average value is an average value of the N first IO request concurrent values, and the second IO request concurrent average value is an average value of the N second IO request concurrent values.
存储设备获得第一、第二IO请求并发平均值后,将所述第一IO请求并发平均值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发平均值所需的交换资源量作为所述接收IO请求所需的交换资源量,以使存储设备根据第一IO请求并发平均值所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据第二IO请求并发平均值所需的交换资源量,从资源池为目标器资源模块分配交换资源。After the storage device obtains the first and second IO request concurrent average values, the exchange resource amount required by the first IO request concurrent average value is used as the exchange resource amount required for sending the IO request, and the second IO request The amount of exchange resources required to request the concurrent average value is used as the amount of exchange resources required for receiving the IO request, so that the storage device uses the amount of exchange resources required by the first IO request concurrent average value from the resource pool to the initiator resource module Allocate switching resources, and allocate switching resources for the target resource module from the resource pool according to the amount of switching resources required by the average concurrent IO request.
举例进行说明,存储设备在10秒内分别对第2、4、6、8、10秒的发送IO请求并发次数以及接收IO请求并发次数进行统计,得到统计结果为:在第2、4、6、8、10秒的发送IO请求并发次数分别为210、180、260、190、350,在第2、4、6、8、10秒的接收IO请求并发次数分别为100、150、260、80、170,以发送IO请求并发次数的最大值作为第一IO请求并发值,以接收IO请求并发次数的最大值作为第二IO请求并发值。即第一、第二IO请求并发值分别为350、260。存储设备在下个10秒继续对发送IO请求并发次数以及接收IO请求并发次数进行上述统计,以获取在该10秒内的第一、第二IO请求并发值,直到获取6个10秒内的第一、第二IO请求并发值。其中,所述6个第一IO请求并发值依次为350、350、370、360、320,存储设备获得第一IO请求并发平均值为350,即第一IO请求并发平均值所需的交换资源量为发送350次IO请求所需的交换资源量。所述6个第二IO请求并发值依次为260、230、270、300、280,存储设备获得所述第一IO请求并发平均值为270,即第二IO请求并发平均值所需的交换资源量为接收270次IO请求所需的交换资源量。存储设备将发送350次IO请求所需的交换资源量作为存储设备发送IO请求所需的交换资源量,将接收270次IO请求所需的交换资源量作为接收IO请求所需的交换资源量。To illustrate with an example, the storage device counts the number of concurrent sent IO requests and the number of concurrent received IO requests within 10 seconds respectively in the 2nd, 4th, 6th, 8th, and 10th seconds, and the statistical results are: , 8, and 10 seconds of sending IO request concurrent times are 210, 180, 260, 190, 350 respectively, and receiving IO request concurrent times of 2, 4, 6, 8, and 10 seconds are 100, 150, 260, 80 respectively , 170, use the maximum number of concurrent IO requests sent as the first concurrent IO request value, and use the maximum number of concurrent received IO requests as the second concurrent IO request value. That is, the first and second IO request concurrency values are 350 and 260 respectively. The storage device continues to perform the above statistics on the number of concurrent IO requests sent and received concurrently in the next 10 seconds to obtain the first and second concurrent IO request values within the 10 seconds until the first and second concurrent IO requests within 6 10 seconds are obtained. 1. The second IO request concurrency value. Among them, the six first IO request concurrency values are 350, 350, 370, 360, and 320 in sequence, and the storage device obtains the first IO request concurrency average value is 350, which is the exchange resource required by the first IO request concurrency average value The amount is the amount of exchange resources required to send 350 IO requests. The six second IO request concurrency values are 260, 230, 270, 300, and 280 in sequence, and the storage device obtains the first IO request concurrency average value of 270, which is the exchange resource required by the second IO request concurrency average value The amount is the amount of exchange resources required to receive 270 IO requests. The storage device uses the amount of exchange resources required for sending 350 IO requests as the amount of exchange resources required for the storage device to send IO requests, and uses the amount of exchange resources required for receiving 270 IO requests as the amount of exchange resources required for receiving IO requests.
步骤S304:存储设备从所述资源池为启动器资源模块分配第一IO请求并发平均值所需的交换资源,从所述资源池为目标器资源模块分配第二IO请求并发平均值所需的交换资源。Step S304: The storage device allocates the exchange resources required by the first IO request concurrency average value for the initiator resource module from the resource pool, and allocates the second IO request concurrency average value required for the target resource module from the resource pool. Exchange resources.
本实施方式中,存储设备获得所述第一IO请求并发平均值及第二IO请求并发平均值后,从所述资源池中为启动器资源模块分配数量等于第一IO请求并发平均值所需的交换资源量的交换资源,从所述资源池中为目标器资源模块分配数量等于第二IO请求并发平均值所需的交换资源量的交换资源。In this embodiment, after the storage device obtains the first and second average concurrent IO requests, it allocates a quantity equal to the number required by the first average concurrent IO requests to the initiator resource module from the resource pool. The amount of exchange resources is allocated to the target resource module from the resource pool, and the amount of exchange resources equal to the amount of exchange resources required by the second average concurrent IO request is allocated.
当然,存储设备并不限于将数量与所述第一IO请求并发平均值所需的交换资源量相等的交换资源分配给启动器资源模块,将与所述第二IO请求并发平均值所需的交换资源量相等的交换资源分配给目标器资源模块。在其他实施方式中,如存储设备可按照所述第一IO请求并发平均值所需的交换资源量的比例,将所述资源池的交换资源分别分配给启动器资源模块,按照第二IO请求并发平均值所需的交换资源量的比例,将所述资源池的交换资源分别分配给目标器资源模块,或者存储设备分别在获得的所述第一、第二IO请求并发平均值所需的交换资源基础上,再增加一定数量交换资源,以保证启动器资源模块和目标器资源模块获得足够的交换资源。Of course, the storage device is not limited to allocating to the initiator resource modules the amount of exchange resources equal to the amount of exchange resources required by the first IO request concurrent average value, and the amount required by the second IO request concurrent average value Swap resources with an equal amount of swap resources are allocated to target resource modules. In other implementation manners, for example, the storage device may allocate the exchange resources of the resource pool to the initiator resource modules according to the ratio of the amount of exchange resources required by the concurrent average value of the first IO request. The ratio of the amount of exchange resources required by the concurrent average value, the exchange resources of the resource pool are allocated to the target resource module respectively, or the storage device obtains the first and second IO request concurrent average values required respectively On the basis of exchange resources, add a certain amount of exchange resources to ensure that the initiator resource module and target resource module obtain enough exchange resources.
本实施方式中,存储设备通过获取多个第一、第二IO请求并发值,得到更稳定的第一、第二IO请求并发平均值,并根据第一IO请求并发平均值所需的交换资源量,从资源池中为启动器资源模块分配交换资源,根据第二IO请求并发平均值所需的交换资源量,从资源池中为目标器资源模块分配交换资源,减少了启动器资源模块、目标器资源模块分配到的交换资源量与存储设备对应业务实际需要的交换资源量的误差。In this embodiment, the storage device obtains a more stable first and second IO request concurrent average value by acquiring multiple first and second IO request concurrent values, and exchanges resources required by the first IO request concurrent average value According to the amount of exchange resources required by the second IO request concurrent average, allocate exchange resources for the target resource module from the resource pool, reducing the number of initiator resource modules, The error between the amount of switching resources allocated by the target resource module and the amount of switching resources actually required by the corresponding service of the storage device.
另外需要说明的是,步骤S303为可选步骤。在另一实施方式中,存储设备执行步骤S301、步骤S302获得第一、第二IO请求并发值后,将第一IO请求并发值所需的交换资源量作为所述发送IO请求所需的交换资源量,将第二IO请求并发值作为所述接收IO请求所需的交换资源量。存储设备执行步骤S304,以根据第一IO请求并发值所需的交换资源量,从所述资源池中为启动器资源模块分配交换资源,根据第二IO请求并发值所需的交换资源量,从所述资源池中为目标器资源模块分配交换资源。In addition, it should be noted that step S303 is an optional step. In another embodiment, after the storage device executes steps S301 and S302 to obtain the first and second IO request concurrency values, it uses the amount of exchange resources required by the first IO request concurrency value as the exchange required for sending the IO request. The resource amount, the second IO request concurrency value is used as the exchange resource amount required for receiving the IO request. The storage device executes step S304 to allocate switching resources for the initiator resource module from the resource pool according to the amount of switching resources required by the concurrency value of the first IO request, and allocate the amount of switching resources required by the concurrency value of the second IO request, Allocating switching resources for the target resource module from the resource pool.
步骤S305:存储设备分别获得预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量。Step S305: The storage device respectively obtains the first amount of overflow switching resources and the second amount of overflow switching resources within a preset second time period.
存储设备向远端设备发送IO请求时,优先向启动器资源模块申请交换资源。如果存储设备向启动器资源模块申请不到交换资源,则存储设备向资源池申请交换资源。所述向启动器资源模块申请不到的交换资源量即为启动器资源模块缺少的交换资源量,即第一溢出交换资源量。存储设备接收到所述远端设备所发送的IO请求时,优先向所述目标器资源模块申请交换资源。如果存储设备向目标器资源模块申请不到交换资源,则存储设备向资源池申请交换资源。所述向目标器资源模块申请不到的交换资源量即为目标器资源模块缺少的交换资源量,即第二溢出交换资源量。存储设备获得在预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量。When the storage device sends an IO request to the remote device, it first applies for exchange resources from the initiator resource module. If the storage device cannot apply for the exchange resource from the initiator resource module, the storage device applies for the exchange resource from the resource pool. The amount of exchange resources that cannot be applied for from the initiator resource module is the amount of exchange resources that the initiator resource module lacks, that is, the amount of first overflow exchange resources. When the storage device receives the IO request sent by the remote device, it preferentially applies for exchange resources from the target resource module. If the storage device cannot apply for the exchange resource from the target resource module, the storage device applies for the exchange resource from the resource pool. The amount of exchange resources that cannot be applied for from the target resource module is the amount of exchange resources that the target resource module lacks, that is, the second overflow exchange resource amount. The storage device obtains the first amount of overflow switching resources and the second amount of overflow switching resources within a preset second time period.
步骤S306:存储设备根据所述第一溢出交换资源量,从所述资源池重新为所述启动器资源模块分配交换资源,根据所述第二溢出交换资源量,从所述资源池重新为所述目标器资源模块分配交换资源。Step S306: The storage device re-allocates switching resources for the initiator resource module from the resource pool according to the first amount of overflowing switching resources, and re-allocates switching resources for the initiator resource module from the resource pool according to the second amount of overflowing switching resources. The above target resource module allocates switching resources.
存储设备获得预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量后,从资源池重新为启动器资源模块和目标器资源模块分配交换资源,以使所述启动器资源模块提供满足发送IO请求所需的交换资源以及使所述目标器资源模块提供满足接收IO请求所需的交换资源。其中,存储设备重新为启动器资源模块分配的交换资源量为上次分配给启动器资源模块的交换资源量与所述第一溢出交换资源量的和,存储设备重新为目标器资源模块分配的交换资源量为上次分配给所述目标器资源模块的交换资源量与所述第二溢出交换资源量的和。After the storage device obtains the first amount of overflowing exchange resources and the second amount of overflowing exchange resources within a preset second time period, it re-allocates exchange resources for the initiator resource module and the target resource module from the resource pool, so that the initiator The resource module provides exchange resources required to satisfy sending IO requests and enables the target resource module to provide exchange resources required to satisfy received IO requests. Wherein, the amount of exchange resources re-allocated by the storage device to the initiator resource module is the sum of the amount of exchange resources allocated to the initiator resource module last time and the first overflow exchange resource amount, and the amount of exchange resources re-allocated by the storage device to the target resource module The exchange resource amount is the sum of the exchange resource amount allocated to the target resource module last time and the second overflow exchange resource amount.
如果资源池中的交换资源量小于存储设备需要重新分配给启动器资源模块和目标器资源模块交换资源量的和,则按照当前存储设备需要重新分配给启动器资源模块和目标器资源模块交换资源量的比例,将资源池的所有交换资源重新分配给启动器资源模块和目标器资源模块。If the amount of exchange resources in the resource pool is less than the sum of the amount of exchange resources that the storage device needs to reallocate to the initiator resource module and target resource module, reallocate the exchange resources to the initiator resource module and target resource module according to the current storage device needs Redistribute all the exchange resources of the resource pool to the initiator resource module and the target resource module in proportion to the amount.
重复执行步骤S305、步骤S306,以每隔所述预设的第二时间,根据所述第一溢出交换资源量和所述第二溢出交换资源量,从所述资源池重新为启动器资源模块和目标器资源模块分配交换资源,直到从所述资源池重新为启动器资源模块和目标器资源模块分配交换资源后,所述资源池无剩余的交换资源,此时,存储设备不再重新为启动器资源模块和目标器资源模块分配交换资源。Step S305 and step S306 are repeatedly executed, so as to reset the initiator resource module from the resource pool according to the first overflow exchange resource amount and the second overflow exchange resource amount every second preset time Allocate exchange resources with the target resource module until the resource pool redistributes exchange resources for the initiator resource module and the target resource module, and there is no remaining exchange resource in the resource pool. At this time, the storage device will no longer Initiator resource modules and target resource modules allocate swap resources.
需要说明的是,存储设备重新为启动器资源模块分配交换资源量并不限为所述启动器资源模块上次分配的交换资源量与第一溢出交换资源量的和,存储设备重新为目标器资源模块分配交换资源量并不限为所述目标器资源模块分配的交换资源量与第二溢出交换资源量的和。It should be noted that the storage device re-allocates the amount of exchange resources for the initiator resource module is not limited to the sum of the amount of exchange resources allocated last time by the initiator resource module and the first overflow exchange resource amount, and the storage device re-assigns the amount of exchange resources for the target The amount of exchange resources allocated by the resource module is not limited to the sum of the amount of exchange resources allocated by the resource module of the target and the amount of second overflow exchange resources.
本实施方式中,所述预设的第一、第二时间及N均由存储设备系统预设设定。但其他实施方式中,所述预设的第一、第二时间及N也可由用户进行预先设定,在此不作限定,其中N为自然数。In this implementation manner, the preset first and second times and N are all preset by the storage device system. However, in other implementation manners, the preset first and second times and N can also be preset by the user, which is not limited here, wherein N is a natural number.
进一步地,在进行交换资源重新分配时,存储设备也未必以第一、第二溢出交换资源量,从资源池重新为启动器资源模块和目标器资源模块分配交换资源。在其他实施方式中,存储设备可在执行步骤S304,根据发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据接收IO请求所需的交换资源量,从资源池为目标器资源模块分配交换资源后,不执行步骤S305、S306。存储设备每隔预设第三时间,重新执行步骤S301至步骤S304,以根据重新获得的发送IO请求所需的交换资源量,从资源池重新为启动器资源模块分配交换资源,根据重新获得的接收IO请求所需的交换资源量,资源池重新为目标器资源模块分配交换资源。其中预设第三时间大于预设的第一时间。Furthermore, when reallocating the swap resources, the storage device does not necessarily re-allocate the swap resources for the initiator resource module and the target resource module from the resource pool with the first and second overflow swap resource amounts. In other implementation manners, the storage device may allocate switching resources for the initiator resource module from the resource pool according to the amount of switching resources required for sending the IO request during execution of step S304, and allocate switching resources from the resource pool according to the amount of switching resources required for receiving the IO request. After the pool allocates switching resources for the target resource module, steps S305 and S306 are not executed. The storage device re-executes steps S301 to S304 every preset third time, so as to re-allocate switching resources for the initiator resource module from the resource pool according to the newly obtained Receive the amount of exchange resources required by the IO request, and the resource pool re-allocates exchange resources for the target resource module. Wherein the preset third time is greater than the preset first time.
本实施方式中,存储设备设置相互独立的启动器资源模块及目标器资源模块,同时,存储设备每个预设第二时间对启动器资源模块及目标器资源模块的交换资源量进行重新分配,使得启动器资源模块及目标器资源模块的交换资源量能够尽可能与当前存储设备实际发送和接收IO请求所需的交换资源量相对应,保证了资源模块的交换资源能够满足存储设备对应的业务需求,提高了存储设备业务运行的性能。In this embodiment, the storage device is provided with mutually independent initiator resource modules and target resource modules, and at the same time, the storage device redistributes the exchange resource amounts of the initiator resource modules and target resource modules at each preset second time, Make the amount of exchange resources of the initiator resource module and the target resource module correspond to the amount of exchange resources required by the current storage device to actually send and receive IO requests as much as possible, ensuring that the exchange resources of the resource modules can meet the corresponding services of the storage device requirements and improve the performance of storage device business operations.
具体,结合下表一、二,对存储设备现有资源管理方式以及本申请资源管理方式进行对比,以说明本发明的技术效果。Specifically, in combination with Tables 1 and 2 below, a comparison is made between the existing resource management method of the storage device and the resource management method of the present application to illustrate the technical effect of the present invention.
请先参阅下表一,存储设备运行INI业务模式和TGT业务模式,均是向资源池申请交换资源,由于存储设备的资源管理具有互斥锁性质,即必须等待上一交换资源申请完成才能进行下一交换资源的申请。故存储设备同时运行两种业务模式时,存在着交换资源竞争。此时,当存储设备的一种业务模式出现异常时,则会影响另一种业务模式的运行性能。例如,资源池的总交换资源量为2048。INI业务模式出现异常,不断向资源池申请交换资源,直到占用资源池的所有交换资源,即INI业务模式申请的资源量为2048。此时,TGT业务模式向资源池申请不到任何交换资源,使得TGT业务模式无法正常运行,故影响了TGT业务模式。同理,TGT业务模式出现异常,占用了资源池的所有或者大部分交换资源,使得INI业务完全申请不到交换资源或者可申请的交换资源很少,进而INI业务模式无法正常运行或者运行进度受到影响。Please refer to the following table 1 first. The storage device runs the INI business mode and the TGT business mode, both of which apply for exchange resources from the resource pool. Since the resource management of the storage device has the nature of a mutual exclusion lock, it must wait for the previous exchange resource application to complete. Application for the next exchange of resources. Therefore, when a storage device runs two service modes at the same time, there is competition for switching resources. At this time, when an abnormality occurs in one service mode of the storage device, it will affect the operation performance of another service mode. For example, the total amount of exchange resources in the resource pool is 2048. An exception occurs in the INI business model, and the exchange resource is continuously applied to the resource pool until all the exchange resources in the resource pool are occupied, that is, the amount of resources requested by the INI business model is 2048. At this time, the TGT business mode cannot apply for any switching resources from the resource pool, which makes the TGT business mode unable to operate normally, thus affecting the TGT business mode. Similarly, the TGT business model is abnormal, occupying all or most of the exchange resources in the resource pool, so that the INI business cannot apply for exchange resources at all or there are few exchange resources that can be applied for, and then the INI business model cannot operate normally or the operation progress is affected. influences.
请参阅下表二,本发明根据所述发送IO请求所需的交换资源量,从资源池为启动器资源模块分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为目标器资源模块分配交换资源,并由启动器资源模块提供INI业务模式所需的交换资源,目标器资源模块提供TGT业务所需式的交换资源,使得INI和TGT两种业务模式的交换资源相互独立,因此不存在INI和TGT两种业务的交换资源竞争。此外,即使其中一种业务模式出现异常,也不会影响另一种业务模式。例如,资源池的总交换资源量为2048,分配给启动器资源模块的交换资源量为1024,分配给目标器资源模块的交换资源量为512。INI业务模式出现异常,在耗尽启动器资源模块的交换资源后,继续向资源池申请交换资源,直到资源池剩余的交换资源也耗尽,此时,INI业务模式申请的交换资源量为1536。由于启动器资源模块与目标器资源模块相互独立,因此,INI业务模式无法向目标器资源模块申请交换资源,目标器资源模块依然存放着512的交换资源以供TGT业务模式申请。同理,TGT业务模式的异常也不会影响到INI业务模式。Please refer to the following table 2, the present invention allocates exchange resources for the initiator resource module from the resource pool according to the amount of exchange resources required for sending the IO request, and allocates exchange resources for the initiator resource module according to the amount of exchange resources required for receiving the IO request. The pool allocates switching resources for the target resource module, and the initiator resource module provides the switching resources required for the INI business mode, and the target resource module provides the switching resources required for the TGT business, so that the switching between the INI and TGT business modes Resources are independent of each other, so there is no exchange resource competition between INI and TGT services. In addition, even if one of the business models is abnormal, it will not affect the other business model. For example, the total amount of exchange resources in the resource pool is 2048, the amount of exchange resources allocated to the initiator resource module is 1024, and the amount of exchange resources allocated to the target resource module is 512. An exception occurs in the INI business model. After the exchange resources of the initiator resource module are exhausted, continue to apply for exchange resources from the resource pool until the remaining exchange resources in the resource pool are also exhausted. At this time, the amount of exchange resources requested by the INI business mode is 1536. . Since the initiator resource module and the target resource module are independent of each other, the INI business model cannot apply for exchange resources from the target resource module, and the target resource module still stores 512 exchange resources for the TGT business model to apply for. Similarly, the abnormality of the TGT business model will not affect the INI business model.
表一:现有资源管理情况Table 1: Current Resource Management Situation
表二:本发明资源管理情况Table 2: Resource management situation of the present invention
图4是本申请交换资源管理装置一实施方式的结构示意图。请参阅图4,所述交换资源管理装置包括启动器资源模块410、目标器资源模块420、获取模块430以及第一分配模块440。Fig. 4 is a schematic structural diagram of an implementation manner of a switching resource management device according to the present application. Referring to FIG. 4 , the switch resource management apparatus includes an initiator resource module 410 , a target resource module 420 , an acquisition module 430 and a first allocation module 440 .
启动器资源模块410用于提供所述发送IO请求所需的交换资源,所述发送IO请求为向远端设备发送的IO请求。The initiator resource module 410 is configured to provide exchange resources required for the sending IO request, where the sending IO request is an IO request sent to a remote device.
目标器资源模块420用于提供所述接收IO请求所需的交换资源,所述接收IO请求为接收远端设备发送的IO请求。The target resource module 420 is configured to provide exchange resources required for receiving an IO request, where the receiving IO request is an IO request sent by a remote device.
获取模块430用于分别获取发送和接收IO请求所需的交换资源量,并将所述发送和所述接收IO请求所需的交换资源量发送给第一分配模块440。存储设备具有同口属性,可运行INI及TGT业务模式。存储设备在运行INI业务模式时,向远端设备发送IO请求,并申请交换资源,在运行TGT业务模式时,接收远端设备所发送的IO请求,并申请交换资源。获取模块430分别获得存储设备发送和接收IO请求所需的交换资源量。例如,获取模块430分别获得存储设备发送IO请求并发次数和接收IO请求并发次数,并将发送IO请求并发次数所需的交换资源量作为发送IO请求所需的交换资源量,将接收IO请求并发次数所需的交换资源量作为接收IO请求所需的交换资源量。其中,所述发送IO请求并发次数为在预定时间内,存储设备向远端设备发送IO请求的次数。所述接收IO请求并发次数为预定时间内,存储设备接收到远端设备所发送的IO请求的次数。本发明实施例中的预设时间可以根据具体实施情况进行设定,本发明对此不作具体限定。The obtaining module 430 is configured to respectively obtain the amount of exchange resources required for sending and receiving the IO request, and send the amount of exchange resources required for sending and receiving the IO request to the first allocation module 440 . The storage device has the property of the same port and can run INI and TGT business modes. When the storage device runs the INI business mode, it sends an IO request to the remote device and applies for exchange resources. When it runs the TGT business mode, it receives the IO request sent by the remote device and applies for exchange resources. The obtaining module 430 respectively obtains the amount of exchange resources required by the storage device for sending and receiving IO requests. For example, the obtaining module 430 respectively obtains the number of concurrent IO requests sent by the storage device and the number of concurrent received IO requests, and uses the amount of exchange resources required for sending the concurrent times of IO requests as the amount of exchange resources required for sending IO requests, and uses the amount of exchange resources required for sending IO requests concurrently. The amount of exchange resources required for the number of times is used as the amount of exchange resources required to receive IO requests. Wherein, the number of concurrent IO requests sent is the number of times the storage device sends IO requests to the remote device within a predetermined time. The number of concurrent IO requests received is the number of times the storage device receives IO requests sent by the remote device within a predetermined period of time. The preset time in the embodiment of the present invention may be set according to specific implementation conditions, which is not specifically limited in the present invention.
第一分配模块440用于根据所述发送IO请求所需的交换资源量,从资源池为所述启动器资源模块410分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为所述目标器资源模块420分配交换资源。The first allocating module 440 is configured to allocate switching resources for the initiator resource module 410 from the resource pool according to the amount of switching resources required for sending the IO request, and allocate switching resources for the initiator resource module 410 according to the amount of switching resources required for receiving the IO request. The resource pool allocates switching resources for the target resource module 420 .
所述存储设备设置有资源池,所述资源池存放存储设备总的交换资源,并且为所述启动器资源模块和所述目标器资源模块提供交换资源。第一分配模块440分别根据存储设备发送和接收IO请求所需的交换资源量,从资源池分别为启动器资源模块410和目标器资源模块420分配交换资源。例如,第一分配模块440根据获得存储设备发送IO请求并发次数所需的交换资源量,从资源池为启动器资源模块410分配发送IO请求并发次数所需的交换资源,第一分配模块440根据获得存储设备接收IO请求并发次数所需的交换资源量,从资源池为目标器资源模块420分配接收IO请求并发次数所需的交换资源。The storage device is provided with a resource pool, and the resource pool stores the total switching resources of the storage device and provides switching resources for the initiator resource module and the target resource module. The first allocating module 440 allocates switching resources to the initiator resource module 410 and the target resource module 420 respectively from the resource pool according to the amount of switching resources required by the storage device to send and receive IO requests. For example, the first allocation module 440 allocates the exchange resources required for sending the IO request concurrent times to the initiator resource module 410 from the resource pool according to the amount of exchange resources required for the storage device to send the IO request concurrent times, and the first allocation module 440 according to Obtain the amount of exchange resources required by the storage device to receive concurrent times of IO requests, and allocate the exchange resources required for receiving concurrent times of IO requests to the target resource module 420 from the resource pool.
图5是本申请交换资源管理装置另一实施方式的结构示意图。请参阅图5,所述交换资源管理装置包括启动器资源模块510、目标器资源模块520、获取模块530、第一分配模块540以及第二分配模块550。其中,获取模块530包括第一统计单元531和第一计算单元532。本实施方式中的启动器资源模块510、目标器资源模块520与上一实施方式的启动器资源模块、目标器资源模块相同,请参阅相关文字说明,在此不再赘述。FIG. 5 is a schematic structural diagram of another embodiment of an apparatus for managing switching resources in the present application. Referring to FIG. 5 , the switch resource management apparatus includes an initiator resource module 510 , a target resource module 520 , an acquisition module 530 , a first allocation module 540 and a second allocation module 550 . Wherein, the acquisition module 530 includes a first statistics unit 531 and a first calculation unit 532 . The initiator resource module 510 and the target resource module 520 in this embodiment are the same as the initiator resource module and the target resource module in the previous embodiment, please refer to relevant text descriptions, and will not repeat them here.
第一统计单元531用于在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,并将统计结果发送给第一计算单元532。The first statistics unit 531 is configured to separately count the number of concurrently sent IO requests and the number of concurrently received IO requests within a preset first time period, and send the statistical results to the first calculating unit 532 .
具体地,第一统计单元531在预设的第一时间内分别对发送IO请求并发次数以及接收IO请求并发次数进行统计,其中,所述发送IO请求并发次数为存储设备向远端设备发送的IO请求的并发次数,即在预定时间内,存储设备向远端设备发送的IO请求的次数。所述接收IO请求并发次数为存储设备接收到远端设备所发送的IO请求的并发次数,即在预定时间内,存储设备接收到远端设备所发送的IO请求的次数。例如,所述预设的第一时间为10秒(S),第一统计单元531分别获得第1、第2、第3……第10秒发送IO请求并发次数和接收IO请求并发次数。本例中,存储设备每秒向远端设备发送的IO请求的次数即为所述发送IO请求并发次数,存储设备每秒接收到远端设备所发送的IO请求的次数即为所述接收IO请求并发次数。当然,第一统计单元未必统计预设第一时间内所有发送和接收IO请求并发次数,在其他实施方式中,第一统计单元还可对预设的第一时间内的发送和接收IO请求并发次数进行抽样统计,在此不作限定。Specifically, the first statistics unit 531 counts the number of concurrently sent IO requests and the number of concurrently received IO requests within a preset first time period, wherein the number of concurrently sent IO requests is the number of times sent by the storage device to the remote device The number of concurrent IO requests, that is, the number of IO requests sent by the storage device to the remote device within a predetermined period of time. The number of concurrent received IO requests is the number of times the storage device receives concurrent IO requests sent by the remote device, that is, the number of times the storage device receives IO requests sent by the remote device within a predetermined time. For example, the preset first time is 10 seconds (S), and the first statistical unit 531 respectively obtains the number of concurrent sending IO requests and the number of concurrent receiving IO requests in the 1st, 2nd, 3rd...10th second. In this example, the number of IO requests sent by the storage device to the remote device per second is the number of concurrent IO requests sent, and the number of times the storage device receives IO requests sent by the remote device per second is the number of received IO requests. The number of concurrent requests. Of course, the first statistical unit does not necessarily count the concurrent times of sending and receiving IO requests within the preset first time period. The number of sampling statistics is carried out, which is not limited here.
第一计算单元532用于根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值,将第一IO请求并发值所需的交换资源量作为发送IO请求所需的交换资源量,将第二IO请求并发值所需的交换资源量作为接收IO请求所需的交换资源量。The first calculation unit 532 is configured to obtain the first IO request concurrent value and the second IO request concurrent value according to the statistical results within the preset first time period, and calculate the exchange resource amount required by the first IO request concurrent value As the exchange resource amount required for sending the IO request, the exchange resource amount required for the second IO request concurrency value is used as the exchange resource amount required for receiving the IO request.
第一计算单元532根据存储设备在所述预设的第一时间内对发送IO请求并发次数的统计结果,获得第一IO请求并发值,在所述预设的第一时间内对接收IO请求并发次数的统计结果,获得第二IO请求并发值。第一计算单元532将第一IO请求并发值所需的交换资源量作为发送IO请求所需的交换资源量,将第二IO请求并发值所需的交换资源量作为接收IO请求所需的交换资源量,并将所述发送和所述接收IO请求分别所需的交换资源量发送给第一分配模块540。其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值。The first calculation unit 532 obtains the first IO request concurrency value according to the statistical result of the storage device sending IO request concurrent times within the preset first time, and receives the IO request within the preset first time The statistical result of the number of concurrency, to obtain the concurrency value of the second IO request. The first calculation unit 532 uses the exchange resource amount required for the first IO request concurrency value as the exchange resource amount required for sending the IO request, and uses the exchange resource amount required for the second IO request concurrency value as the exchange resource amount required for receiving the IO request resource amount, and send the exchange resource amounts required by the sending and the receiving IO requests to the first allocating module 540 respectively. Wherein, the first IO request concurrency value is the maximum value among the number of sending IO request concurrency times counted within the preset first time period, and the second IO request concurrency value is within the preset first time. The maximum value of the number of concurrent times of receiving IO requests obtained through statistics within a period of time, or the first concurrent number of IO requests is the average value of the number of times of concurrent times of sending IO requests obtained through statistics within the preset first time period The second IO request concurrent value is an average value of the received IO request concurrent times obtained through statistics within the preset first time period.
具体应用中,第一计算单元532可根据统计结果,以选择将在所述预设的第一时间内统计得到的发送和接收IO请求并发次数的最大值分别作为所述第一和第二IO请求并发值,以选择将在所述预设的第一时间内统计得到的发送和接收IO请求并发次数的平均值分别作为所述第一和第二IO请求并发值。如果存储设备运行的业务并发量比较不稳定,在预设的第一时间内发送或接收IO请求并发次数间相差较大,为保证存储设备分配的交换资源尽可能地满足发送或接收IO请求并发次数所需,第一计算单元532将在所述预设的第一时间内统计得到的发送IO请求并发次数中的最大值作为第一IO请求并发值,将在所述预设的第一时间内统计得到的接收IO请求并发次数中的最大值作为第二IO请求并发值。如果存储设备运行的业务并发量比较稳定,在预设的第一时间内发送或接收IO请求并发次数间变化不大,则第一计算单元532可将预设的第一时间内发送IO请求并发次数的平均值作为第一IO请求并发值,将设的第一时间内接收IO请求并发次数的平均值作为第二IO请求并发值。In a specific application, the first calculation unit 532 can select the maximum number of concurrent times of sending and receiving IO requests that is statistically obtained within the preset first time period as the first and second IO requests according to the statistical results. The request concurrency value is used to select the average value of the number of concurrent sending and receiving IO requests counted and obtained within the preset first time period as the first and second IO request concurrent values respectively. If the concurrency of services running on the storage device is relatively unstable, and the number of concurrent IO requests sent or received within the preset first time varies greatly, in order to ensure that the exchange resources allocated by the storage device meet the concurrency of sending or receiving IO requests as much as possible If the number of times is required, the first calculation unit 532 will use the maximum value of the number of concurrent IO requests sent within the preset first time as the first IO request concurrent value, and will The maximum value of the number of concurrent received IO requests obtained through internal statistics is used as the second concurrent IO request value. If the number of concurrent services running on the storage device is relatively stable, and the number of concurrent IO requests sent or received within the preset first time does not change much, the first computing unit 532 can send IO requests concurrently within the preset first time. The average value of the number of times is used as the first IO request concurrent value, and the average value of the received IO request concurrent times within the first time is set as the second IO request concurrent value.
第一分配模块540用于根据所述发送IO请求所需的交换资源量,从资源池为所述启动器资源模块510分配交换资源,根据所述接收IO请求所需的交换资源量,从所述资源池为所述目标器资源模块520分配交换资源。The first allocation module 540 is configured to allocate switching resources for the initiator resource module 510 from the resource pool according to the amount of switching resources required for sending the IO request, and allocate switching resources for the initiator resource module 510 according to the amount of switching resources required for receiving the IO request. The resource pool allocates switching resources for the target resource module 520 .
本实施方式中,第一分配模块540从所述资源池中为启动器资源模块510分配第一IO请求并发值所需的交换资源,为目标器资源模块520分配第二IO请求并发值所需的交换资源。In this embodiment, the first allocation module 540 allocates the exchange resources required for the first IO request concurrency value to the initiator resource module 510 from the resource pool, and allocates the exchange resources required for the second IO request concurrency value to the target resource module 520 exchange resources.
当然,第一分配模块并不限于将与所述第一IO请求并发值数量相等的交换资源对应分配给启动器资源模块,将所述第二IO请求并发值数量相等的交换资源对应分配给目标器资源模块。在其他实施方式中,第一分配模块可按照所述第一IO请求并发值与所述第二IO请求并发值的比例,将所述资源池的交换资源分别分配给启动器资源模块和目标器资源模块,或者第一分配模块分别在获得的所述第一、第二IO请求并发平均值所需的交换资源基础上,再增加一定数量交换资源,以保证启动器资源模块和目标器资源模块获得足够的交换资源。Certainly, the first allocating module is not limited to correspondingly allocating exchange resources equal to the number of concurrent values of the first IO request to the initiator resource module, and correspondingly allocating exchange resources equal to the number of concurrent values of the second IO request to the target server resource module. In other implementation manners, the first allocation module may allocate the exchange resources of the resource pool to the initiator resource module and the target respectively according to the ratio of the first IO request concurrency value to the second IO request concurrency value The resource module, or the first allocation module respectively adds a certain amount of exchange resources on the basis of the obtained exchange resources required by the first and second IO request concurrent average values to ensure that the initiator resource module and the target resource module Get enough exchange resources.
第二分配模块550用于每隔预设的第二时间,获得在所述预设的第二时间内的第一溢出资源量和第二溢出资源量,并根据当前分配给启动器资源模块510的交换资源量以及第一溢出资源量,将所述资源池的交换资源重新分配给启动器资源模块510,根据当前分配给目标器资源模块520的交换资源量以及第二溢出资源量,将所述资源池的交换资源重新分配给目标器资源模块520。其中,所述第一溢出交换资源量为所述启动器资源模块510缺少的交换资源量,所述第二溢出交换资源量为所述目标器资源模块520缺少的交换资源量。The second allocating module 550 is configured to obtain the first overflow resource amount and the second overflow resource amount within the preset second time every preset second time, and allocate them to the initiator resource module 510 according to the current The amount of exchange resources and the first amount of overflow resources, reallocate the exchange resources of the resource pool to the initiator resource module 510, and according to the amount of exchange resources currently allocated to the target resource module 520 and the second amount of overflow resources, redistribute the exchange resources of the resource pool The exchange resource of the above resource pool is reallocated to the target resource module 520. Wherein, the first amount of overflowing exchange resources is the amount of exchange resources lacking in the initiator resource module 510 , and the second amount of overflowing exchange resources is the amount of exchange resources lacking in the target resource module 520 .
存储设备向远端设备发送IO请求时,优先向启动器资源模块510申请交换资源。如果存储设备向启动器资源模块510申请不到交换资源,则存储设备向资源池申请交换资源。所述向启动器资源模块510申请不到的交换资源量即为启动器资源模块510缺少的交换资源量,即第一溢出交换资源量。存储设备接收到所述远端设备所发送的IO请求时,优先向所述目标器资源模块520申请交换资源。如果存储设备向目标器资源模块520申请不到交换资源,则存储设备向资源池申请交换资源。所述向目标器资源模块520申请不到的交换资源量即为目标器资源模块520缺少的交换资源量,即第二溢出交换资源量。When the storage device sends an IO request to the remote device, it first applies to the initiator resource module 510 for switching resources. If the storage device fails to apply for the exchange resource from the initiator resource module 510, the storage device applies for the exchange resource from the resource pool. The amount of exchange resources that cannot be applied for from the initiator resource module 510 is the amount of exchange resources that the initiator resource module 510 lacks, that is, the amount of first overflow exchange resources. When the storage device receives the IO request sent by the remote device, it first applies to the target resource module 520 for exchange resources. If the storage device fails to apply for the exchange resource from the target resource module 520, the storage device applies for the exchange resource from the resource pool. The amount of exchange resources that cannot be applied for from the target resource module 520 is the amount of exchange resources that the target resource module 520 lacks, that is, the second overflow amount of exchange resources.
第二分配模块550分别获得在预设的第二时间内的第一溢出交换资源量和第二溢出交换资源量,并从资源池重新为启动器资源模块510、目标器资源模块520分配交换资源,以使启动器资源模块510提供满足发送IO请求所需的交换资源以及使目标器资源模块520提供满足接收IO请求所需的交换资源。其中,第二分配模块550重新为启动器资源模块510分配的交换资源量为上次分配给启动器资源模块510的交换资源量与第一溢出交换资源量的和,第二分配模块550重新为目标器资源模块520分配的交换资源量为上次分配给目标器资源模块520的交换资源量与第二溢出交换资源量的和。The second allocation module 550 respectively obtains the first overflow exchange resource amount and the second overflow exchange resource amount within the preset second time, and re-allocates exchange resources for the initiator resource module 510 and the target resource module 520 from the resource pool , so that the initiator resource module 510 provides the exchange resources required to satisfy sending IO requests and enables the target resource module 520 to provide exchange resources required to satisfy received IO requests. Wherein, the exchange resource amount allocated to the initiator resource module 510 by the second allocation module 550 is the sum of the exchange resource amount allocated to the initiator resource module 510 last time and the first overflow exchange resource amount, and the second allocation module 550 is The exchange resource allocated by the target resource module 520 is the sum of the exchange resource allocated to the target resource module 520 last time and the second overflow exchange resource.
如果资源池的交换资源量小于第二分配模块550需要重新分配给启动器资源模块510和目标器资源模块520的交换资源量的和,则第二分配模块550按照当前需要重新分配给启动器资源模块510和目标器资源模块520的交换资源量的比例,将资源池的所有交换资源分别重新分配给启动器资源模块510和目标器资源模块520。If the amount of exchange resources in the resource pool is less than the sum of the amount of exchange resources that the second allocation module 550 needs to reallocate to the initiator resource module 510 and the target resource module 520, then the second allocation module 550 reallocates the initiator resources according to the current needs The ratio of exchange resource amounts of the module 510 and the target resource module 520 redistributes all the exchange resources in the resource pool to the initiator resource module 510 and the target resource module 520 respectively.
每隔所述预设的第二时间,第二分配模块550根据所述第一溢出交换资源量和所述第二溢出交换资源量,从所述资源池重新分别为启动器资源模块510和目标器资源模块520分配交换资源,直到从所述资源池重新为启动器资源模块510和目标器资源模块520分配交换资源后,所述资源池无剩余的交换资源。此时,第二分配模块550不再重新为启动器资源模块510和目标器资源模块520分配交换资源。Every second preset time, the second allocating module 550 re-assigns the initiator resource module 510 and the target resource module 510 respectively from the resource pool according to the first overflow exchange resource amount and the second overflow exchange resource amount. The switch resources are allocated to the initiator resource module 520 until the switch resources are re-allocated to the initiator resource module 510 and the target resource module 520 from the resource pool, and the resource pool has no remaining switch resources. At this point, the second allocating module 550 does not re-allocate exchange resources for the initiator resource module 510 and the target resource module 520 .
需要说明的是,第二分配模块重新为启动器资源模块分配的交换资源量不限为上次分配给启动器资源模块的交换资源量与第一溢出交换资源量的和,第二分配模块重新为目标器资源模块分配的交换资源量不限为上次分配给目标器资源模块的交换资源量与第二溢出交换资源量的和。在其他实施方式中,第二分配模块可按照所述两个和的比例,将所述资源池的交换资源分别分配给启动器资源模块和目标器资源模块,或者第二分配模块分别在获得的所述第一、第二IO请求并发平均值所需的交换资源基础上,再增加一定数据量交换资源,以保证启动器资源模块和目标器资源模块获得足够的交换资源。It should be noted that the amount of exchange resources re-allocated by the second allocation module to the initiator resource module is not limited to the sum of the amount of exchange resources allocated to the initiator resource module last time and the amount of the first overflow exchange resources. The amount of exchange resources allocated to the target resource module is not limited to the sum of the amount of exchange resources allocated to the target resource module last time and the amount of second overflow exchange resources. In other implementation manners, the second allocation module may allocate the exchange resources of the resource pool to the initiator resource module and the target resource module respectively according to the ratio of the two sums, or the second allocation module respectively allocates On the basis of the exchange resources required by the first and second IO request concurrent averages, a certain amount of data exchange resources are added to ensure that the initiator resource module and the target resource module obtain sufficient exchange resources.
本实施方式中,所述预设的第一、第二时间及N均为交换资源管理装置预设的值。但在其他应用实施方式中,所述预设的第一、第二时间及N也可为用户预先设定的值,在此不作限定,其中N为自然数。In this implementation manner, the preset first and second times and N are values preset by the switch resource management device. However, in other application implementation manners, the preset first and second times and N may also be values preset by the user, which are not limited herein, wherein N is a natural number.
进一步地,在进行交换资源重新分配时,交换资源管理装置也未必根据第一、第二溢出交换资源量,从资源池重新为启动器资源模块和目标器资源模块分配交换资源。在其他实施方式中,交换资源管理装置可不包括第二分配模块,交换资源管理装置的获取模块还用于每隔预设第三时间,分别根据存储设备的发送IO请求并发次数和接收IO请求并发次数,获得第一和第二IO请求并发值,第一分配模块根据第一IO请求并发值所需的交换资源量,从资源池重新为启动器资源模块分配交换资源,根据第二IO请求并发值所需的交换资源量,从资源池重新为目标器资源模块分配交换资源。其中,预设第三时间大于预设的第一时间。Furthermore, when reallocating switching resources, the switching resource management device does not necessarily re-allocate switching resources for the initiator resource module and the target resource module from the resource pool according to the first and second overflow switching resource amounts. In other implementation manners, the switch resource management device may not include the second allocation module, and the acquisition module of the switch resource management device is also used for every preset third time, respectively according to the number of concurrent sending IO requests and the concurrent times of receiving IO requests of the storage device Number of times, to obtain the first and second IO request concurrency values, the first allocation module re-allocates exchange resources for the initiator resource module from the resource pool according to the amount of exchange resources required by the first IO request concurrency value, and according to the second IO request concurrency The amount of swap resources required by the value, and re-allocate swap resources for the target resource module from the resource pool. Wherein, the preset third time is greater than the preset first time.
更进一步地,在其他实施方式中,本发明交换资源管理装置还可以包括申请模块,所述申请模块用于在存储设备向远端设备发送IO请求时,向所述启动器资源模块申请交换资源,在存储设备接收到远端设备所发送的IO请求时,优先向所述目标器资源模块申请交换资源。在向启动器资源模块或者目标器资源模块申请不到交换资源时,向资源池申请交换资源。Furthermore, in other implementation manners, the exchange resource management device of the present invention may further include an application module, which is configured to apply for exchange resources from the initiator resource module when the storage device sends an IO request to the remote device , when the storage device receives the IO request sent by the remote device, it preferentially applies to the target resource module for exchange resources. When the exchange resource cannot be applied for from the initiator resource module or the target resource module, apply for the exchange resource from the resource pool.
本实施方式中,交换资源管理装置设置相互独立的启动器资源模块及目标器资源模块,并且启动器资源模块及目标器资源模块的交换资源相互独立,同时,交换资源管理装置每隔预设第二时间对启动器资源模块及目标器资源模块的交换资源量进行重新的分配,使得启动器资源模块及目标器资源模块的交换资源量能够尽可能与当前存储设备实际发送和接收IO请求所需的交换资源量,保证了资源模块的交换资源能够满足存储设备对应的业务需求,提高了存储设备业务运行的性能。In this embodiment, the exchange resource management device sets mutually independent initiator resource modules and target resource modules, and the exchange resources of the initiator resource modules and target resource modules are independent of each other. Second, re-allocate the exchange resources of the initiator resource module and the target resource module so that the exchange resources of the initiator resource module and the target resource module can be as close as possible to the actual sending and receiving IO requests of the current storage device The amount of switching resources ensures that the switching resources of the resource module can meet the corresponding service requirements of the storage device, and improves the performance of the service operation of the storage device.
优化地,请参阅图6,图6是本发明交换资源管理装置再一实施方式的结构示意图。本实施方式中的资源管理装置与上一实施方式的资源管理装置基本相同,其区别在于,获取模块630包括第二统计单元631和第二计算单元632。For optimization, please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of still another implementation manner of an switching resource management device according to the present invention. The resource management device in this embodiment is basically the same as the resource management device in the previous embodiment, the difference being that the acquisition module 630 includes a second statistics unit 631 and a second calculation unit 632 .
第二统计单元631用于在N个预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,并将N个预设的第一时间内的统计结果发送给第二计算单元632。其中,第二统计单元631进行统计的方式与上一实施方式第一统计单元的统计方式相同,在此不作赘述。The second statistical unit 631 is configured to separately count the number of concurrent IO requests sent and the concurrent number of received IO requests within N preset first times, and send the statistical results within the N preset first times to the first Two computing units 632 . Wherein, the statistical method of the second statistical unit 631 is the same as that of the first statistical unit in the previous embodiment, and will not be repeated here.
第二计算单元632用于分别根据N个预设的第一时间内的统计结果,获得N个第一IO请求并发值和N个第二IO请求并发值,根据获得的所述N个所述第一IO请求并发值获得第一IO请求并发平均值,根据获得的所述N个第二IO请求并发值获得第二IO请求并发平均值,将所述第一IO请求并发平均值所需的交换资源量作为所述发送IO请求所需的交换资源量,将所述第二IO请求并发平均值作为所述接收IO请求所需的交换资源量,并将所述发送和所述接收IO请求分别所需的交换资源量发送给第一分配模块640。其中,本实施方式中的第一、第二IO请求并发值与上实施方式中的第一、第二IO请求并发值相同,故不作重复描述。所述第一IO请求并发平均值为所述N个第一IO请求并发值的平均值,所述第二IO请求并发平均值为所述N个第二IO请求并发值的平均值。The second calculation unit 632 is configured to obtain N first IO request concurrency values and N second IO request concurrency values respectively according to N preset statistical results within the first time period, and according to the N obtained The first IO request concurrency value obtains the first IO request concurrency average value, obtains the second IO request concurrency average value according to the obtained N second IO request concurrency values, and obtains the first IO request concurrency average value required The exchange resource amount is used as the exchange resource amount required for sending the IO request, the second IO request concurrent average value is used as the exchange resource amount required for the receiving IO request, and the sending and receiving IO request The required exchange resource amounts are sent to the first allocating module 640 . Wherein, the first and second IO request concurrency values in this embodiment are the same as the first and second IO request concurrency values in the above embodiment, so repeated descriptions are omitted. The first concurrent IO request average value is an average value of the N first IO request concurrent values, and the second IO request concurrent average value is an average value of the N second IO request concurrent values.
第一分配模块640根据所述第一IO请求并发平均值,将所述资源池中的交换资源分配给启动器资源模块610,根据所述第二IO请求并发平均值,将所述资源池中的交换资源分配给目标器资源模块620。The first allocating module 640 allocates the exchange resource in the resource pool to the initiator resource module 610 according to the first concurrent average value of IO requests, and allocates the exchange resources in the resource pool according to the second concurrent average value of IO requests. The switching resources of are allocated to the target resource module 620.
举例进行说明,第二统计单元631在10秒内分别对发送IO请求并发次数以及接收IO请求并发次数进行统计,得到统计结果为:在第2、4、6、8、10秒的发送IO请求并发次数分别为210、180、260、190、350,在第2、4、6、8、10秒的接收IO请求并发次数分别为100、150、260、80、170。第一计算单元532分别以发送和接收IO请求并发次数的最大值作为第一、第二IO请求并发值,即第一和第二IO请求并发值分别为350、260。第二统计单元631在下个10秒继续对发送IO请求并发次数以及接收IO请求并发次数进行上述统计,以使第二计算单元632分别获取在该10秒内的第一和第二IO请求并发值,直到获取6个10秒内的第一和第二IO请求并发值,其中,所述6个第一IO请求并发值依次为350、350、370、360、320,第二计算单元632获得所述6个第一IO请求并发值的平均值为350,即第一IO请求并发平均值所需的交换资源量为发送350次IO请求所需的交换资源量。所述6个第二IO请求并发值依次为260、230、270、300、280,第二计算单元63获得所述6个第二IO请求并发值的平均值为270,即第二IO请求并发平均值所需的交换资源量为接收270次IO请求所需的交换资源量。第一分配模块640将资源池中发送350次IO请求所需的交换资源量分配给启动器资源模块610,将资源池中接收270次IO请求所需的交换资源量分配给目标器资源模块620。For example, the second statistical unit 631 counts the number of concurrent IO requests sent and the number of concurrent received IO requests within 10 seconds, and the statistical results are: the number of IO requests sent in the 2nd, 4th, 6th, 8th, and 10th seconds The concurrency times are 210, 180, 260, 190, 350 respectively, and the concurrency times of receiving IO requests in the 2nd, 4th, 6th, 8th, and 10th seconds are 100, 150, 260, 80, and 170 respectively. The first calculation unit 532 uses the maximum number of concurrent IO requests sent and received as the first and second concurrent IO request values, that is, the first and second concurrent IO request values are 350 and 260 respectively. The second statistical unit 631 continues to perform the above statistics on the number of concurrent IO requests sent and the concurrent number of received IO requests in the next 10 seconds, so that the second calculation unit 632 can respectively obtain the first and second concurrent IO request values within the 10 seconds , until six concurrency values of the first and second IO requests within 10 seconds are acquired, wherein the six concurrency values of the first IO requests are 350, 350, 370, 360, and 320 in sequence, and the second computing unit 632 obtains the The average value of the 6 first concurrent IO requests is 350, that is, the amount of exchange resources required for the average value of the first concurrent IO requests is the amount of exchange resources required for sending 350 IO requests. The six second IO request concurrency values are sequentially 260, 230, 270, 300, and 280, and the second calculation unit 63 obtains the average value of the six second IO request concurrency values as 270, that is, the second IO request concurrency The average amount of exchange resources required is the amount of exchange resources required to receive 270 IO requests. The first allocation module 640 allocates the amount of exchange resources required to send 350 IO requests in the resource pool to the initiator resource module 610, and allocates the amount of exchange resources required to receive 270 IO requests in the resource pool to the target resource module 620 .
本实施方式中,资源管理装置分别根据N个第一IO请求并发值的平均值和N个第二IO请求并发值的平均值,将所述资源池中的交换资源对应分配给启动器资源模块和目标器资源模块,使得启动器资源模块和目标器资源模块分配到的交换资源量更加稳定,减少了与存储设备对应业务实际需要的交换资源量的误差。In this embodiment, the resource management device correspondingly allocates the exchange resources in the resource pool to the initiator resource modules according to the average value of the N first IO request concurrent values and the average value of the N second IO request concurrent values. and the target resource module, so that the amount of exchange resources allocated by the initiator resource module and the target resource module is more stable, and the error of the amount of exchange resources actually required by the corresponding service of the storage device is reduced.
请参阅图7,图7是本申请交换资源管理装置又再一实施方式的结构示意图。交换资源管理装置包括处理器710和存储器740。其中,存储器740包括启动器资源模块720和目标器资源模块730,存储器740通过总线(如图示)与处理器710连接。Please refer to FIG. 7 . FIG. 7 is a schematic structural diagram of yet another implementation manner of an apparatus for managing switching resources in the present application. The switch resource management device includes a processor 710 and a memory 740 . Wherein, the memory 740 includes an initiator resource module 720 and a target resource module 730 , and the memory 740 is connected to the processor 710 through a bus (as shown in the figure).
处理器710执行存储器740中存储的启动器资源模块720和目标器资源模块730的计算机指令,将资源池中的交换资源分属启动器资源模块720和目标器资源模块730,所述分属启动器资源模块720的交换资源和分属目标器资源模块730的交换资源相互独立;且在向远端设备发送IO请求时,向该INI业务模式提供分属启动器资源模块720的交换资源,在所述发送的IO请求的响应完成时,释放所述INI业务模式占用的交换资源;在接收到远端设备所发送的IO请求时,向该TGT业务模式提供分属目标器资源模块730的交换资源,在对所述接收的IO请求的响应完成时,释放的所述TGT业务模式占用交换资源。The processor 710 executes the computer instructions of the initiator resource module 720 and the target resource module 730 stored in the memory 740, and assigns the switching resources in the resource pool to the initiator resource module 720 and the target resource module 730, and the assignment starts The exchange resource of the resource module 720 and the exchange resource belonging to the target resource module 730 are independent of each other; and when an IO request is sent to the remote device, the exchange resource belonging to the initiator resource module 720 is provided to the INI business model, and in When the response of the sent IO request is completed, release the exchange resource occupied by the INI service mode; when receiving the IO request sent by the remote device, provide the TGT service mode with the exchange resources belonging to the target device resource module 730 resources, when the response to the received IO request is completed, the released TGT business mode occupies switching resources.
具体地,处理器710执行存储器740存储的启动器资源模块720和目标器资源模块730的计算机指令,在预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,根据在所述预设的第一时间内的统计结果,获得第一IO请求并发值及第二IO请求并发值,将第一IO请求并发值所需的交换资源量作为发送IO请求所需的交换资源量,将第二IO请求并发值所需的交换资源量作为接收IO请求所需的交换资源量,并根据发送IO请求并发值所需的交换资源量,从资源池为启动器资源模块720分配交换资源,即根据发送IO请求并发值所需的交换资源量,将资源池中的交换资源分属启动器资源模块720,根据接收IO请求并发值所需的交换资源量,从资源池为目标器资源模块730分配交换资源,即根据接收IO请求并发值所需的交换资源量,将资源池中的交换资源分属目标器资源模块730。Specifically, the processor 710 executes the computer instructions of the initiator resource module 720 and the target resource module 730 stored in the memory 740, and counts the number of concurrent sending IO requests and the concurrent number of receiving IO requests within a preset first time, According to the statistical results within the preset first time period, the first IO request concurrency value and the second IO request concurrency value are obtained, and the amount of exchange resources required by the first IO request concurrency value is used as the amount required for sending the IO request The amount of exchange resources, the amount of exchange resources required for the second IO request concurrency value is used as the amount of exchange resources required for receiving IO requests, and according to the amount of exchange resources required for sending IO request concurrency values, from the resource pool to the initiator resource module 720 allocates exchange resources, that is, assigns the exchange resources in the resource pool to the initiator resource module 720 according to the amount of exchange resources required for sending IO request concurrency values, and allocates the exchange resources from the resource pool according to the amount of exchange resources required for receiving IO request concurrency values Allocate exchange resources for the target resource module 730 , that is, assign the exchange resources in the resource pool to the target resource module 730 according to the amount of exchange resources required to receive the concurrent value of the IO request.
进一步具体地,处理器710在预设的第一时间内分别对发送IO请求并发次数以及接收IO请求并发次数进行统计,其中,所述发送IO请求并发次数为存储设备向远端设备发送的IO请求的并发次数,即在预定时间内,存储设备向远端设备发送的IO请求的次数。所述接收IO请求并发次数为存储设备接收到远端设备所发送的IO请求的并发次数,即预定时间内,存储设备接收到远端设备所发送的IO请求的次数。More specifically, the processor 710 counts the number of concurrently sent IO requests and the number of concurrently received IO requests within a preset first time period, wherein the number of concurrently sent IO requests is the number of concurrently sent IO requests from the storage device to the remote device. The number of concurrent requests, that is, the number of IO requests sent by the storage device to the remote device within a predetermined time. The number of concurrent received IO requests is the number of times the storage device receives concurrent IO requests sent by the remote device, that is, the number of times the storage device receives IO requests sent by the remote device within a predetermined period of time.
处理器710根据在所述预设的第一时间内对发送IO请求并发次数的统计结果,获得第一IO请求并发值,在所述预设的第一时间内对接收IO请求并发次数的统计结果,获得第二IO请求并发值。其中,所述第一IO请求并发值为在所述预设的第一时间内统计得到的发送IO请求并发次数中的最大值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的接收IO请求并发次数中的最大值,或者,所述第一IO请求并发值为在所述预设的第一时间内统计得到的所述发送IO请求并发次数的平均值,所述第二IO请求并发值为在所述预设的第一时间内统计得到的所述接收IO请求并发次数的平均值。The processor 710 obtains the first IO request concurrency value according to the statistical result of the number of concurrent IO requests sent within the first preset time, and the statistics of the number of concurrent IO requests received within the first preset time As a result, the second IO request concurrency value is obtained. Wherein, the first IO request concurrency value is the maximum value among the number of sending IO request concurrency times counted within the preset first time period, and the second IO request concurrency value is within the preset first time. The maximum value of the number of concurrent times of receiving IO requests obtained through statistics within a period of time, or the first concurrent number of IO requests is the average value of the number of times of concurrent times of sending IO requests obtained through statistics within the preset first time period The second IO request concurrent value is an average value of the received IO request concurrent times obtained through statistics within the preset first time period.
具体应用中,处理器710可根据统计结果,以选择将在所述预设的第一时间内统计得到的发送和接收IO请求并发次数的最大值分别作为所述第一和第二IO请求并发值,或者以选择将在所述预设的第一时间内统计得到的发送和接收IO请求并发次数的平均值分别作为所述第一和第二IO请求并发值。如果存储设备运行的业务并发量比较不稳定,在预设的第一时间内发送或接收IO请求并发次数间相差较大,为保证存储设备分配的交换资源尽可能地满足发送或接收IO请求并发次数所需,处理器710将在所述预设的第一时间内统计得到的发送和接收IO请求并发次数中的最大值分别作为第一IO请求并发值和第二IO请求并发值。如果存储设备运行的业务并发量比较稳定,在预设的第一时间内发送或接收IO请求并发次数间变化不大,则处理器710可将预设的第一时间内发送和接收IO请求并发次数的平均值分别作为第一IO请求并发值和第二IO请求并发值。In specific applications, the processor 710 may select the maximum values of the number of concurrent sending and receiving IO requests that are statistically obtained within the preset first time period as the first and second concurrent IO requests according to the statistical results. value, or select the average value of the number of concurrent sending and receiving IO requests that is statistically obtained within the preset first time period as the first and second concurrent IO request values. If the concurrency of services running on the storage device is relatively unstable, and the number of concurrent IO requests sent or received within the preset first time varies greatly, in order to ensure that the exchange resources allocated by the storage device meet the concurrency of sending or receiving IO requests as much as possible If the times are required, the processor 710 uses the maximum value of the number of concurrent sending and receiving IO requests counted within the preset first time as the first concurrent IO request value and the second concurrent IO request value. If the number of concurrent services running on the storage device is relatively stable, and there is little change in the number of concurrent IO requests sent or received within the preset first time, the processor 710 can send and receive IO requests concurrently within the preset first time The average value of times is respectively used as the first IO request concurrency value and the second IO request concurrency value.
处理器710从所述资源池为启动器资源模块720分配第一IO请求并发值所需的交换资源,为目标器资源模块730分配第二IO请求并发值所需的交换资源。The processor 710 allocates the exchange resource required by the first IO request concurrency value to the initiator resource module 720 from the resource pool, and allocates the exchange resource required by the second IO request concurrency value to the target resource module 730 .
当然,处理器并不限于将与所述第一IO请求并发值数量相等的交换资源对应分配给启动器资源模块,将与所述第二IO请求并发值量相等的交换资源对应分配给目标器资源模块。在其他实施方式中,处理器可按照第一IO请求并发值与第二IO请求并发值的比例,将所述资源池的交换资源分别分配给启动器资源模块和目标器资源模块,或者处理器分别在获得的所述第一、第二IO请求并发平均值所需的交换资源基础上,再增加一定数量交换资源,以保证启动器资源模块和目标器资源模块获得足够的交换资源。Certainly, the processor is not limited to correspondingly allocating exchange resources equal to the number of concurrency value of the first IO request to the initiator resource module, and correspondingly allocating exchange resources equal to the number of concurrency value of the second IO request to the target resource module. In other implementation manners, the processor may allocate the exchange resources of the resource pool to the initiator resource module and the target resource module respectively according to the ratio of the first IO request concurrency value to the second IO request concurrency value, or the processor Adding a certain amount of exchange resources on the basis of the obtained exchange resources required by the first and second IO request concurrent averages respectively, so as to ensure that the initiator resource module and the target resource module obtain sufficient exchange resources.
优化地,处理器710进一步用于在N个预设的第一时间内分别对发送IO请求并发次数和接收IO请求并发次数进行统计,分别根据N个预设的第一时间内的统计结果,获得N个第一IO请求并发值和N个第二IO请求并发值,根据获得的所述N个所述第一IO请求并发值获得第一IO请求并发平均值,根据获得的所述N个第二IO请求并发值获得第二IO请求并发平均值,并根据第一IO请求并发平均值,从所述资源池中为启动器资源模块720分配交换资源,根据第二IO请求并发平均值,从所述资源池中为目标器资源模块730分配交换资源。Optimally, the processor 710 is further configured to count the concurrent times of sending IO requests and the concurrent times of receiving IO requests within N preset first times, respectively, according to the statistical results within N preset first times, Obtain N first IO request concurrency values and N second IO request concurrency values, obtain the first IO request concurrency average value according to the obtained N first IO request concurrency values, and obtain the first IO request concurrency average value according to the obtained N The second IO request concurrency value obtains the second IO request concurrency average value, and allocates switching resources for the initiator resource module 720 from the resource pool according to the first IO request concurrency average value, and according to the second IO request concurrency average value, Allocate switching resources for the target resource module 730 from the resource pool.
进一步优化地,处理器710还用于每隔预设的第二时间,获得在所述预设的第二时间内的第一溢出资源量和第二溢出资源量,并从资源池重新为启动器资源模块720和目标器资源模块730分配交换资源。其中,处理器710重新为启动器资源模块720分配的交换资源量为上次分配给启动器资源模块720的交换资源量与第一溢出交换资源量的和,处理器710重新为目标器资源模块730分配的交换资源量为上次分配给目标器资源模块730的交换资源量与第二溢出交换资源量的和。Further optimally, the processor 710 is further configured to obtain the first overflow resource amount and the second overflow resource amount within the preset second time every preset second time, and restart the resource pool from the resource pool The server resource module 720 and the target resource module 730 allocate switching resources. Wherein, the amount of exchange resources allocated to the initiator resource module 720 by the processor 710 is the sum of the exchange resource amount allocated to the initiator resource module 720 last time and the first overflow exchange resource amount, and the processor 710 reassigns the amount of exchange resources for the target resource module 720. The amount of exchange resources allocated by 730 is the sum of the amount of exchange resources allocated to the target resource module 730 last time and the amount of second overflow exchange resources.
如果资源池的交换资源量小于处理器710需要重新分配给启动器资源模块720和目标器资源模块730的交换资源量的和,则处理器710按照当前需要重新分配给启动器资源模块720和目标器资源模块730的交换资源量的比例,将资源池的所有交换资源重新分别分配给启动器资源模块720和目标器资源模块730。If the amount of exchange resources in the resource pool is less than the sum of the amount of exchange resources that the processor 710 needs to reallocate to the initiator resource module 720 and the target resource module 730, then the processor 710 reallocates to the initiator resource module 720 and the target resource module 720 according to the current needs. According to the ratio of the exchange resource amount of the resource module 730, all the exchange resources in the resource pool are redistributed to the initiator resource module 720 and the target resource module 730 respectively.
当从所述资源池中重新分别为启动器资源模块720和目标器资源模块730分配交换资源后,所述资源池无剩余的交换资源时,处理器710不再重新为启动器资源模块720和目标器资源模块730分配交换资源。After re-allocating switching resources for the initiator resource module 720 and the target resource module 730 from the resource pool, when there is no remaining switching resource in the resource pool, the processor 710 will not re-allocate the switching resources for the initiator resource module 720 and the target resource module 730. The target resource module 730 allocates switching resources.
本实施方式中,所述预设的第一、第二时间及N均为交换资源管理装置预设的值。但在其他应用实施方式中,所述,所述预设的第一、第二时间及N也可为用户预先设定的值,在此不作限定,其中N为自然数。In this implementation manner, the preset first and second times and N are values preset by the switch resource management device. However, in other application implementation manners, as mentioned above, the preset first and second times and N may also be values preset by the user, which are not limited herein, wherein N is a natural number.
进一步地,在进行交换资源重新分配时,处理器也未必根据第一溢出交换资源量和第二溢出交换资源量,从资源池重新为启动器资源模块和目标器资源模块分配交换资源。在其他实施方式中,处理器可每隔预设第三时间,根据存储设备发送的IO请求并发次数获得第一IO请求并发值,并根据第一IO请求并发值所需的交换资源量,从资源池重新为启动器资源模块分配交换资源,根据存储设备接收的IO请求并发次数获得第二IO请求并发值,并根据第二IO请求并发值所需的交换资源量,从资源池重新为目标器资源模块分配交换资源。其中,预设第三时间大于预设的第一时间。更进一步地,在其他实施方式中,处理器还可用于在存储设备向远端设备发送IO请求时,向所述启动器资源模块申请交换资源,在存储设备接收到远端设备所发送的IO请求时,向所述目标器资源模块申请交换资源。在向启动器资源模块或者目标器资源模块申请不到交换资源时,向资源池申请交换资源。Further, when reallocating switching resources, the processor does not necessarily re-allocate switching resources for the initiator resource module and the target resource module from the resource pool according to the first overflow switching resource amount and the second overflow switching resource amount. In other implementation manners, the processor may obtain the first concurrent IO request value according to the number of concurrent IO requests sent by the storage device every preset third time, and obtain the first IO request concurrent value according to the amount of exchange resources required by the first concurrent IO request value, from The resource pool re-allocates exchange resources for the initiator resource module, obtains the second IO request concurrency value according to the number of IO request concurrency received by the storage device, and re-targets from the resource pool according to the amount of exchange resources required by the second IO request concurrency value The server resource module allocates switching resources. Wherein, the preset third time is greater than the preset first time. Furthermore, in other implementation manners, the processor may also be configured to apply for an exchange resource from the initiator resource module when the storage device sends an IO request to the remote device, and when the storage device receives the IO request sent by the remote device, When requesting, apply for exchange resources from the target resource module. When the exchange resource cannot be applied for from the initiator resource module or the target resource module, apply for the exchange resource from the resource pool.
需要说明的是,本发明交换资源管理装置上述实施方式中均包括启动器资源模块和目标器资源模块,但本发明交换资源管理装置并不限于包括启动器资源模块和目标器资源模块,在存储设备本身设置有启动器资源模块和目标器资源模块的实施方式中,本发明交换资源管理装置则不包括启动器资源模块和目标器资源模块。It should be noted that the switching resource management device of the present invention includes an initiator resource module and a target resource module in the above embodiments, but the switching resource management device of the present invention is not limited to including an initiator resource module and a target resource module. In an embodiment where the device itself is provided with an initiator resource module and a target resource module, the switch resource management device of the present invention does not include the initiator resource module and the target resource module.
另外,本申请交换资源管理装置一般应用在具有同口属性的存储设备中,但在具体应用中,本申请交换资源管理装置也可应用在仅具有启动器属性的服务器,或者仅具有目标器属性的存储设备,在此不作限定。In addition, the switching resource management device of this application is generally applied to storage devices with the same port attribute, but in specific applications, the switching resource management device of this application can also be applied to servers with only the initiator attribute, or only have the target device attribute The storage device is not limited here.
本申请还提供了一种存储设备,所述存储设备包括上述任一种实施方式中的交换资源管理装置,其具体实施方式请参阅图1、图4至图7及相关文字说明,在此不再赘述。The present application also provides a storage device, the storage device includes the exchange resource management device in any one of the above-mentioned implementation manners, and for the specific implementation manner, please refer to Fig. 1, Fig. Let me repeat.
通过上述方案,本申请根据发送和接收IO请求所需的资源量,从资源池分别为相互独立的启动器资源模块和目标器资源模块分配交换资源,启动器资源模块和目标器资源模块的交换资源相互独立,且INI业务模式所需的交换资源由所述启动器资源模块提供,TGT业务模式所需的交换资源由目标器资源模块提供,使得INI和TGT两种业务模式的交换资源相互独立,避免了同口模式中INI业务模式和TGT业务模式出现交换资源竞争。同时,在其中一种业务出现异常,导致对应的资源模块交换资源耗尽时,也不会影响另一种业务交换资源的申请,使得另一种业务能够正常运行,提高了存储设备的可靠性。Through the above scheme, this application allocates exchange resources for mutually independent initiator resource modules and target resource modules from the resource pool according to the amount of resources required for sending and receiving IO requests, and the exchange of initiator resource modules and target resource modules The resources are independent of each other, and the switching resources required by the INI business mode are provided by the initiator resource module, and the switching resources required by the TGT business mode are provided by the target resource module, so that the switching resources of the INI and TGT business modes are independent of each other , avoiding exchange resource competition in the INI business mode and the TGT business mode in the same port mode. At the same time, when one of the services is abnormal and the exchange resources of the corresponding resource modules are exhausted, it will not affect the application for exchange resources of the other service, so that the other service can run normally and improve the reliability of the storage device. .
在本申请所提供的几个实施方式中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several implementation manners provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device implementations described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,RandomAccessMemory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disk or optical disk, and other media that can store program codes.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310192445.XA CN103268298B (en) | 2013-05-22 | 2013-05-22 | Exchange resource management method, device and memory device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310192445.XA CN103268298B (en) | 2013-05-22 | 2013-05-22 | Exchange resource management method, device and memory device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103268298A CN103268298A (en) | 2013-08-28 |
CN103268298B true CN103268298B (en) | 2016-04-13 |
Family
ID=49011929
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310192445.XA Active CN103268298B (en) | 2013-05-22 | 2013-05-22 | Exchange resource management method, device and memory device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103268298B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109634888A (en) * | 2018-12-12 | 2019-04-16 | 浪潮(北京)电子信息产业有限公司 | A kind of FC interface card exchange resource identification processing method and associated component |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1457895A3 (en) * | 1995-10-26 | 2005-04-20 | Matsushita Electric Industrial Co., Ltd. | File System |
US7529781B2 (en) * | 2004-04-30 | 2009-05-05 | Emc Corporation | Online initial mirror synchronization and mirror synchronization verification in storage area networks |
US7773521B2 (en) * | 2004-04-30 | 2010-08-10 | Emc Corporation | Storage switch traffic bandwidth control |
EP3169130B1 (en) * | 2006-02-03 | 2020-03-25 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Uplink resource allocation in a mobile communication system |
-
2013
- 2013-05-22 CN CN201310192445.XA patent/CN103268298B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN103268298A (en) | 2013-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111344688B (en) | Method and system for providing resources in cloud computing | |
JP5510556B2 (en) | Method and system for managing virtual machine storage space and physical hosts | |
US9009719B2 (en) | Computer workload capacity estimation using proximity tables | |
CN103180830B (en) | CPU resource allocation method and computing nodes | |
US8782240B2 (en) | Resource allocation using shared resource pools | |
CN105159782B (en) | Based on the method and apparatus that cloud host is Order splitting resource | |
CN101118521B (en) | Systems and methods for distributing virtual input/output operations across multiple logical partitions | |
CN107426274B (en) | Method and system for service application and monitoring, analyzing and scheduling based on time sequence | |
CN101799797B (en) | Dynamic allocation method of user disk quota in distributed storage system | |
JP2001331333A (en) | Computer system and control method for computer system | |
CN107534583A (en) | The application drive and adaptive unified resource management of data center with multiple resource schedulable unit (MRSU) | |
CN105242957A (en) | Method and system for cloud computing system to allocate GPU resources to virtual machine | |
US20210191751A1 (en) | Method and device for allocating resource in virtualized environment | |
CN103870333A (en) | Global memory sharing method, global memory sharing device and communication system | |
CN103744719A (en) | Lock management method, lock management system, lock management system configuration method and lock management system configuration device | |
CN111831504B (en) | Monitoring method, monitoring device, computer equipment and medium | |
CN103455378A (en) | Resource distribution method of virtual clusters, device and system | |
CN107766153A (en) | A kind of EMS memory management process and device | |
CN111798113A (en) | Resource allocation method, device, storage medium and electronic equipment | |
US20140280972A1 (en) | Broker module for managing and monitoring resources between internet service providers | |
CN114489978A (en) | Resource scheduling method, device, equipment and storage medium | |
CN105553872A (en) | Multipath data traffic load equalizing method | |
KR20160097372A (en) | Efficient resource utilization in data centers | |
WO2020024207A1 (en) | Service request processing method, device and storage system | |
CN101594642B (en) | Resource allocation method and resource allocation device used for communication network element device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |