This application claims priority under 35 U.S.C. § 119 to Korean Patent Application No. 10-2016-0003350, filed on Jan. 11, 2016 in the Korean Intellectual Property Office, the disclosure of which is incorporated by reference herein in its entirety.
Exemplary embodiments of the inventive concept relate to a method of sharing a multi-queue resource, and more particularly, to a method of sharing a multi-queue resource based on weight.
To access a resource such as a hardware device, an application may dispatch, to an operating system (OS), an input and output (I/O) request with respect to the resource. The OS may have a hierarchical structure and may transfer the I/O request dispatched from the application to the resource (e.g., the hardware device).
Performance of processors that can execute the OS and multiple applications (or multiple processes) and resources connected to these processors has increased over time. Accordingly, providing high bandwidth to the multiple applications may be able to take advantage of this increased performance.
According to an exemplary embodiment of the inventive concept, an input/output (I/O) throttling method of a process group, performed with respect to a multi-queue capable resource, includes setting a total credit corresponding to the multi-queue capable resource, allocating an individual credit to the process group based on the total credit and a weight of the process group, and selectively dispatching an I/O request of the process group to a multi-queue manager by consuming at least a part of the individual credit.
According to an exemplary embodiment of the inventive concept, an I/O throttling method of a plurality of process groups, performed with respect to a multi-queue capable resource, includes setting a total credit corresponding to the multi-queue capable resource, allocating individual credits to the plurality of process groups based on the total credit and weights of the plurality of process groups, and selectively dispatching I/O requests of each of the plurality of process groups to a multi-queue manager by consuming at least parts of at least one of the individual credits.
According to an exemplary embodiment of the inventive concept, an I/O throttling method of a plurality of process groups, performed with respect to a multi-queue capable resource, includes determining a first total credit, with respect to the multi-queue capable resource, for the plurality of process groups. Each of the plurality of process groups is assigned a weight and a first process group among the plurality of process groups has the highest weight and is allocated a first individual credit that is a portion of the first total credit. The I/O throttling method further includes dispatching I/O requests from the first process group and consuming at least a part of the first individual credit when the first individual credit is not exhausted during a dispatching time, and delaying I/O requests from the first process group when the first individual credit is exhausted during a throttling time. The dispatching time and the throttling time form a first period.
The above and other features of the inventive concept will be more clearly understood by describing in detail exemplary embodiments thereof with reference to the accompanying drawings.
Exemplary embodiments of the inventive concept will be described more fully hereinafter with reference to the accompanying drawings. Like reference numerals may refer to like elements throughout the accompanying drawings.
Exemplary embodiments of the inventive concept provide a method of sharing a multi-queue capable resource and enabling a process to use the high bandwidth provided by the multi-queue capable resource.
A process group may include at least one process executed on an operating system (OS). For example, the process group may be an application including one or more processes or a container including one or more applications. The container may virtualize an environment that may drive the application including the one or more processes. The container may virtualize a central processing unit (CPU) and a memory region to provide an independent environment for applications. Containers may share a library, the OS, etc. As will be described below with reference to
A plurality of process groups may be performed on the OS. Each process group may dispatch an I/O request for the OS to access a resource. The resource may be a hardware device accessible through a device driver of the OS and may include, for example, a storage device, an I/O device, a communication device, etc. For example, the resource may be a storage device accessible through various interface protocols, such as universal serial bus (USB), embedded MultiMediaCard (eMMC), peripheral component interconnection express (PCI-E), non-volatile memory express (NVMe), universal flash storage (UFS), Advanced Technology Attachment (ATA), Serial-ATA, Parallel-ATA, small computer system interface (SCSI), enhanced small disk interface (ESDI), or Integrated Drive Electronics (IDE). The resource is described as a storage device below, but it will be understood that the inventive concept is not limited thereto.
A computing system including a CPU (or a processor) that execute process groups and an OS may include a plurality of resources. The OS may schedule I/O requests dispatched by process groups to be transferred to the plurality of resources. For example, the OS may have a hierarchical structure including a plurality of layers and may dispatch the I/O requests of the process groups from upper layers to lower layers to process the I/O requests. As performance of processors and resources has increased, exemplary embodiments of the inventive concept provide a scheme for quickly processing abundant I/O requests of the process groups. For example, the storage device (the resource) may be connected to a bus of the computing system such as PCI-E, which provides a high I/O bandwidth.
The storage device and the OS use a multi-queue technique to provide a high I/O bandwidth. In other words, the OS may store the I/O requests of the process groups with respect to the storage device in a plurality of queues and may transfer the I/O requests stored in the plurality of queues to the storage device. The storage device may process the I/O requests received from the plurality of queues in parallel with one another and may perform an operation in response to the I/O requests, e.g., storing or reading data. As described above, a resource that supports this multi-queue technique may be referred to as a multi-queue capable resource.
The I/O throttling method of the process group according to an exemplary embodiment of the inventive concept may fully utilize the multi-queue technique to allow process groups to efficiently share the multi-queue capable resource. The process groups may share resources substantially in correspondence with the weights of the process groups.
Referring to
In operation S30, a credit (or an individual credit) may be allocated to a process group. The credit may be determined based on the total credit and the weight of the process group. The determined credit may be allocated to the process group. As will be described below with reference to
In operation S50, the I/O request of the process group may be selectively dispatched by consuming the credit. For example, the I/O request dispatched from the process group may be selectively dispatched to a lower layer (e.g., a block layer of
As shown in
The kernel space 200 may include a plurality layers, for example, an I/O throttling layer, a block layer, and a device driver layer. The layers of the kernel space 200 of
Referring to
According to an exemplary embodiment of the inventive concept, the I/O throttling module 210 may perform the I/O throttling method of the process group as shown in
The multi-queue manager 230 may receive the I/O request from the I/O throttling module 210 of an upper layer (e.g., the I/O throttling layer). The multi-queue manager 230 may include and manage a plurality of queues that store I/O requests. For example, when a processor includes a plurality of cores, the multi-queue manager 230 may include a plurality of software queues corresponding to the cores and a plurality of hardware dispatch queues accessible by the multi-queue capable resource 300. As shown in
A device driver 250 may receive the I/O request from the multi-queue manager 230 of the block layer. The device driver 250 may transfer the I/O request to the multi-queue capable resource 300 through an interface protocol supported by the multi-queue capable resource 300. The device driver 250 may receive state information of the multi-queue capable resource 300, operation complete information, an interrupt, etc. from the multi-queue capable resource 300.
The multi-queue capable resource 300 may be a hardware storage device as described with reference to
Referring to
The credit manager 214 may receive weights W1, W2, and W3 of the process groups (e.g., the process groups 110, 120, and 130 of
The credit manager 214 may selectively dispatch the I/O requests dispatched by the process groups to a lower layer (for example, the block layer of
According to an exemplary embodiment of the inventive concept, the total credit may be periodically set. For example, as shown in
The credits allocated to the process groups may be allocated (or determined) in proportion to the weights of the process groups. In other words, as shown in
W1:W2:W3=C11:C12:C13=C21:C22:C23=C31:C32:C33
For example, when the total credit TC1 set at t10 is 100 and the first through third weights W1 through W3 are 1000, 700, and 300, respectively, first through third credits C11, C12, and C13 at t10 may be 50, 35, and 15, respectively.
The I/O throttling module 210 may allocate the credits C1, C2, and C3 to the process groups 110, 120, and 130, respectively, and may selectively dispatch the I/O requests of the process groups 110, 120, and 130 to the multi-queue manager 230 based on the credits C1, C2, and C3. For example, the I/O throttling module 210 may selectively dispatch the I/O request dispatched by the first process group 110 to the multi-queue manager 230 by consuming the first credit C1. When the first credit C1 is not exhausted, the I/O throttling module 210 may consume at least a part of the first credit C1 based on the I/O request received from the first process group 110 and may dispatch the I/O request to the multi-queue manager 230. When the first credit C1 is exhausted, the I/O throttling module 210 may delay the I/O request received from the first process group 110 until a next period (e.g., period T of
Referring to
In operation S13, the total credit is set based on a credit of a process group having the highest weight. In other words, as shown in
In operation S15, it is determined whether a period has elapsed. When it is determined that the period has elapsed, the total credit may be reset in operation S13. If not, operation S15 is performed again. In other words, the total credit may be reset each period.
Referring to
In a section from t40 to t41, the first credit C1 may be reduced due to I/O requests dispatched by the first process group 110. In a section from t41 to t42, the first credit C1 may be uniformly maintained. In a section from t42 to t43, the first credit C1 may be further reduced due to the I/O requests dispatched by the first process group 110. The first credit C1 may be exhausted at t43. Accordingly, the I/O requests dispatched by the first process group 110 from t43 to t50 may be delayed until a next period.
As shown in
Referring to
As shown in
Referring to
When the first credit C1 is not exhausted during the current period (e.g., ‘ThrottlingTime’ is zero, as described with reference to
The total credit of the next period (e.g., ‘NextTotalCredit’) may be set based on the first credit C1 (e.g., ‘NextCredit’) that is to be allocated to the first process group 110 in the next period. In other words, at line 8 of
Referring to
Referring to
In operation S53, it is determined whether a credit of the process group is exhausted. When it is determined that the credit of the process group is exhausted, in operation S55, the I/O request is delayed until a next period. In other words, the I/O request of the process group corresponding to the exhausted credit may not be dispatched to the multi-queue manager 230 of
When it is determined that the credit of the process group is not exhausted, in operation S57, at least a part of the credit is consumed. For example, the I/O request of the first process group 110 of
As shown in
The CPU 11 may be configured to execute instructions to perform at least one of the methods described above, according to exemplary embodiments of the inventive concept. For example, the CPU 11 may execute the process groups and OS and may perform the I/O throttling method of process groups. In other words, operations included in flowcharts described above may be partially or wholly performed by the CPU 11. The process groups executed by the CPU 11 may access other elements connected to and in communication with the CPU 11 via the bus 19, e.g., a multi-queue capable resource such as the I/O device 13 and the nonvolatile storage device 17, by using the I/O throttling method of process groups.
According to an exemplary embodiment of the inventive concept, the CPU 11 may execute an arbitrary instruction set (for example, Intel Architecture-32 (IA-32), 64 bit extension IA-32, x86-64, PowerPC, Sparc, MIPS, ARM, IA-64, etc.). The CPU 11 may include a plurality of cores that independently execute instructions.
The I/O device 13 may receive an input signal from outside the computing system 10 or may provide an output signal to the outside of the computing system 10. For example, the I/O device 13 may include an input device such as a keyboard, a touch screen, a pointing device, etc. and an output device such as a display device, a printer, etc. The I/O device 13 may include a communication device that transmits or receives data to or from the outside of the computing system 10 over a communication network. The I/O device 13 may be a multi-queue capable resource as described above, and may receive requests from process groups executed by the CPU 11 by using the I/O throttling method of process groups according to exemplary embodiments of the inventive concept.
The RAM 15 may function as a data memory and may temporarily store data that moves between elements of the computing system 10. For example, the RAM 15 may be a volatile memory device, e.g., a dynamic random access memory (DRAM), a static RAM (SRAM), a mobile DRAM, a double data rate synchronous DRAM (DDR SDRAM), a low-power DDR (LPDDR) SDRAM, a graphic DDR (GDDR), a Rambus DRAM (RDRAM), etc.
The nonvolatile storage device 17 may store a plurality of instructions executed by the CPU 11 for the I/O throttling method of process groups according to exemplary embodiments of the inventive concept. For example, the nonvolatile storage device 17 may be a nonvolatile memory system such as a hard disk drive (HDD), a solid disk drive (SSD), a memory card, etc. The nonvolatile storage device 17 may include an electrically erasable programmable read-only memory (EEPROM), a flash memory, a phase-change RAM (PRAM), a resistive RAM (RRAM), a nano floating gate memory (NFGM), a polymer RAM (PoRAM), a magnetic RAM (MRAM), a ferroelectric RAM (FRAM), etc. The nonvolatile storage device 17 may be a multi-queue capable resource as described above, and may receive the requests from the process groups executed by the CPU 11 by using the I/O throttling method of process groups according to exemplary embodiments of the inventive concept.
The non-transitory computer-readable recording medium 20 may include an arbitrary computer-readable storage medium while being used to provide instructions and/or data to a computer. For example, the non-transitory computer-readable recording medium 20 may include a magnetic or optical medium such as a disk, a tape, CD-ROM, DVD-ROM, CD-RW, DVD-RW, etc., a volatile or nonvolatile memory such as RAM, ROM, a flash memory, etc., a nonvolatile memory accessed via USB interface, microelectromechanical systems (MEMS), etc. The non-transitory computer-readable recording medium 20 may be inserted into the computer, may be integrated into the computer, or may be coupled to the computer via a communication medium such as a network and/or a wireless link.
The I/O throttling module 21 may include a plurality of instructions to perform the I/O throttling method of process groups according to exemplary embodiments of the inventive concept described above. For example, the I/O throttling module 21 may include a plurality of instructions to perform an operation of selectively dispatching I/O requests of process groups with respect to a multi-queue capable resource by setting a total credit, allocating credits to the process groups based on the total credit and weights of the process groups, and consuming the allocated credits.
The multi-queue manager 23 may include a plurality of instructions to perform an operation of managing a plurality of queues according to exemplary embodiments of the inventive concept described above. For example, the device driver 25 may include a plurality of instructions to perform an operation of transferring an I/O request to the multi-queue capable resource through an interface protocol supported by the multi-queue capable resource.
While the inventive concept has been shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made thereto without departing from the spirit and scope of the inventive concept as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2016-0003350 | Jan 2016 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
7127798 | Reger | Oct 2006 | B1 |
7646717 | Anker | Jan 2010 | B1 |
7761375 | Karamanolis et al. | Jul 2010 | B2 |
7761875 | Karamanolis | Jul 2010 | B2 |
7836212 | Tripathi | Nov 2010 | B2 |
8302633 | Saltel | Nov 2012 | B2 |
8380541 | Holmes | Feb 2013 | B1 |
8392585 | Balwani | Mar 2013 | B1 |
8392633 | Gulati | Mar 2013 | B2 |
8435738 | Holmes | May 2013 | B2 |
8601473 | Aron | Dec 2013 | B1 |
9298493 | Harel | Mar 2016 | B1 |
9563511 | Foley | Feb 2017 | B1 |
9760392 | Dantkale | Sep 2017 | B1 |
9823857 | Pendharkar | Nov 2017 | B1 |
20030103514 | Nam | Jun 2003 | A1 |
20030115513 | Harriman | Jun 2003 | A1 |
20030135449 | Xu | Jul 2003 | A1 |
20030231645 | Chandra | Dec 2003 | A1 |
20050137966 | Munguia | Jun 2005 | A1 |
20050141424 | Lim | Jun 2005 | A1 |
20070189283 | Agarwal | Aug 2007 | A1 |
20070242675 | Romrell | Oct 2007 | A1 |
20110103316 | Ulupinar | May 2011 | A1 |
20110149977 | Thomas | Jun 2011 | A1 |
20120327779 | Gell | Dec 2012 | A1 |
20120330802 | Guthrie | Dec 2012 | A1 |
20120331231 | Floyd | Dec 2012 | A1 |
20130054901 | Biswas | Feb 2013 | A1 |
20130254324 | Kramnik | Sep 2013 | A1 |
20130258791 | Mishima | Oct 2013 | A1 |
20130262533 | Mitra | Oct 2013 | A1 |
20130318283 | Small | Nov 2013 | A1 |
20140052938 | Kim | Feb 2014 | A1 |
20140059551 | Umanesan | Feb 2014 | A1 |
20140169488 | Varanese | Jun 2014 | A1 |
20140204748 | Basso | Jul 2014 | A1 |
20140244899 | Schmier | Aug 2014 | A1 |
20140280970 | Pijewski | Sep 2014 | A1 |
20150199269 | Bert | Jul 2015 | A1 |
20160085458 | Skandakumaran | Mar 2016 | A1 |
20160117105 | Thangaraj | Apr 2016 | A1 |
20160234297 | Ambach | Aug 2016 | A1 |
20160291882 | Wakhare | Oct 2016 | A1 |
20160292116 | Wakhare | Oct 2016 | A1 |
20170010992 | Sarcone | Jan 2017 | A1 |
Number | Date | Country |
---|---|---|
2015518987 | Jul 2015 | JP |
1020140082756 | Jul 2014 | KR |
Entry |
---|
Zhang, et al., “Storage Performance Virtualization via Throughput and Latency Control”, ACM Transactions on Storage, vol. 2., No. 3. Aug. 2006, pp. 283-308. |
Axboe, Jens, “Linux Block IO-Present and Future”, Proceedings of the Linux Symposium, vol. One, Jul. 21-24, 2004, Ottawa, Ontario Canada, pp. 51-61. |
Min, Junghi et al., “Cgroup++: Enhancing I/O Resource Management of Linux Cgroup on NUMA Systems with NVME SSds”,Middleware Posters and Demos '15, Dec. 7-11, 2015, Vancouver, BC. |
Poster: Min, Junghi et al., “Cgroup++: Enhancing I/O Resource Management of Linux Cgroup on NUMA Systems with NVME SSds”, Middleware Posters and Demos '15, Dec. 7-11, 2015, Vancouver, BC. |
Number | Date | Country | |
---|---|---|---|
20170199765 A1 | Jul 2017 | US |