KR101932522B1 - Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same - Google Patents
Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same Download PDFInfo
- Publication number
- KR101932522B1 KR101932522B1 KR1020180082289A KR20180082289A KR101932522B1 KR 101932522 B1 KR101932522 B1 KR 101932522B1 KR 1020180082289 A KR1020180082289 A KR 1020180082289A KR 20180082289 A KR20180082289 A KR 20180082289A KR 101932522 B1 KR101932522 B1 KR 101932522B1
- Authority
- KR
- South Korea
- Prior art keywords
- slots
- virtual machines
- virtual
- slot
- usage amount
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
본 발명은 가상 머신에 가상 GPU 메모리의 슬롯을 동적으로 할당하는 방법 및 이를 구현하는 컴퓨팅 장치에 관한 것이다.The present invention relates to a method of dynamically allocating a slot of a virtual GPU memory to a virtual machine and a computing device implementing the method.
가상 머신이란 하드웨어를 소프트웨어로 구현하고 구현된 소프트웨어 상에서 운영체계가 작동하도록 기술적으로 구현한 것으로서, 가상 머신으로 구성된 가상화 시스템이 효율적으로 동작하기 위해서는, 가상화 시스템 내에서 불필요한 연산이 수행되지 않도록 가상 GPU 메모리의 슬롯이 가상 머신에 효과적으로 할당되어야 한다.The virtual machine is a hardware implemented in software and implemented technically so that the operating system operates on the implemented software. In order for the virtualization system configured as a virtual machine to operate efficiently, a virtual GPU memory Slots should be effectively allocated to the virtual machine.
한편, 종래 기술은 물리적으로 구현된 내장 GPU를 가상화 시스템에 적용하기 위해 가상 GPU 메모리를 구현하며, 구현된 가상 GPU 메모리는 로우 글로벌 그래픽스 메모리(Low Global Graphics Memory)와 하이 글로벌 그래픽스 메모리(High Global Graphics Memory)로 구분된다. 글로벌 그래픽스 메모리(Global Graphics Memory)의 논리 주소(logical address)는 물리적 GTT(physical GTT, physical Graphics Translation Table)를 사용하여 시스템 메모리의 실제 주소(physical address)로 변환된다.Meanwhile, the prior art realizes a virtual GPU memory for applying a physically implemented embedded GPU to a virtualization system, and implemented virtual GPU memory includes a low global graphics memory and a high global graphics memory Memory). The logical address of the global graphics memory is converted to the physical address of the system memory using the physical GTT (physical Graphics Translation Table).
또한, 종래 기술은 위와 같이 구현된 가상 머신에 가상 GPU 메모리의 슬롯을 할당하며, 구체적으로, 확장성(scalability) 문제를 해결하기 위해, 로우 글로벌 그래픽스 메모리의 일부분을 관리 도메인을 제외한 모든 가상 머신들이 공유할 수 있도록 하고, 하이 글로벌 그래픽스 메모리를 384MB의 슬롯으로 나누어 해당 슬롯들을 복수의 가상 머신들이 공유할 수 있도록 한다. 전환할 가상 GPU(vGPU)를 실행하기 전에 물리적 GTT(physical GTT)에 존재하지 않는 가상 GPU의 개별 GTT(private GTT) 항목(entry)이 복사된다. 물리적 GTT의 내용이 수정되는 경우, 개별 GTT의 내용 또한 함께 수정된다.In order to solve the scalability problem, the conventional technology allocates a slot of the virtual GPU memory to the virtual machine implemented as described above. Specifically, a part of the low global graphics memory is allocated to all the virtual machines except the management domain And divides high-global graphics memory into 384 MB slots so that the corresponding slots can be shared by a plurality of virtual machines. Before running the virtual GPU (vGPU) to be converted, the individual GTT (private GTT) entries of the virtual GPUs that do not exist in the physical GTT are copied. If the content of the physical GTT is modified, the contents of the individual GTT are also modified.
그러나, 종래 기술에 의한 슬롯 할당 방법은 가상 머신의 GPU 사용량을 고려하지 않고 가상 머신들에 가상 GPU 메모리의 슬롯을 일괄적으로 할당하는바, 가상 머신의 컨텍스트 전환시 불필요한 슬롯의 복사가 발생한다. 따라서, 이러한 방법은 불필요한 연산이 수행되어 전체 가상화 시스템의 비효율성을 초래하는 문제가 있다.However, according to the slot allocation method of the related art, unnecessary slot copying occurs when the context of the virtual machine is switched because the slots of the virtual GPU memory are collectively allocated to the virtual machines without considering the GPU usage amount of the virtual machine. Therefore, this method has a problem that unnecessary operations are performed, which results in inefficiency of the entire virtualization system.
본 발명이 해결하고자 하는 과제는 가상 머신들의 GPU 사용량을 고려하여, 가상 GPU 메모리의 슬롯을 공유하는 가상 머신 간의 GTT 복사의 수가 최소가 되도록 가상 머신에 가상 GPU 메모리의 슬롯을 할당하는 기술을 제공하는 것이다.SUMMARY OF THE INVENTION The present invention provides a technique for allocating slots of a virtual GPU memory to a virtual machine so that the number of GTT copies among virtual machines sharing a slot of a virtual GPU memory is minimized in consideration of GPU usage of virtual machines will be.
본 발명의 일 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치는 복수의 슬롯들을 포함하는 가상 GPU 메모리, 상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고 메모리 재할당부를 포함하며, 상기 메모리 재할당부는 상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고, 상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하고, 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.A computing device for reallocating a slot included in a virtual GPU memory according to an exemplary embodiment of the present invention to a plurality of virtual machines includes a virtual GPU memory including a plurality of slots, A plurality of virtual machines receiving the virtual GPU memory, performing a task assigned using the virtual GPU memory, and a memory reallocation unit, wherein the memory reallocation unit determines the usage amount of the plurality of virtual machines using the virtual GPU memory Allocates the plurality of slots to the plurality of virtual machines in the order of the number of slots occupied when the calculated usage deviation is less than the threshold value, , One or more first unallocated virtual machines that are not primarily reallocated to the plurality of slots Allocating the plurality of slots to the first unallocated virtual machines so as to share at least one slot to the right of the virtual machines, and when the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to one or more secondary slots to share at least one slot in the case of one or more second unallocated virtual machines that are not primarily reallocated to the plurality of slots, .
상기 메모리 재할당부는 상기 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산한다.The memory reallocation unit determines a minimum usage amount and a maximum usage amount among the usage amounts determined and divides the maximum usage amount by the minimum usage amount to calculate the usage amount deviation.
상기 메모리 재할당부는 상기 계산한 사용량 편차가 상기 임계값 미만인 경우, 각 가상 머신이 차지하는 슬롯 수를 결정하고, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.Wherein the memory reallocation unit determines the number of slots occupied by each virtual machine when the calculated usage amount deviation is less than the threshold value and sets the plurality of slots to 1 And for the first unassigned virtual machines to allocate the slots to share a slot with the least recently reallocated virtual machine among the virtual machines that have been primarily reassigned to the plurality of slots Secondarily reallocated.
상기 메모리 재할당부는 상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the memory reallocation unit primarily reallocates the first slot from the leftmost slot among the plurality of slots in the order of the virtual machines having the largest number of slots occupied, And then reassigns it to the secondary.
상기 메모리 재할당부는 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하며, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.Wherein the memory reallocation unit continuously and primarily reallocates the plurality of slots so that there is no slot shared by the determined usage amount of the virtual machines in the order of the calculated usage amount deviations is greater than or equal to the threshold value, In the case of allocation virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots.
상기 메모리 재할당부는 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the memory reallocation unit primarily reallocates the slots from the leftmost slot among the plurality of slots in order of the virtual machines having the determined usage, and in the case of the second unallocated virtual machines, And then reassigns it to the secondary.
본 발명의 일 실시예에 따른 하나 이상의 프로세서를 포함하는 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법은 상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계, 상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.A method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines by a computing device including one or more processors according to an embodiment of the present invention includes: Calculating a usage deviation of the plurality of virtual machines by using the determined amount of usage, calculating a usage deviation of the plurality of virtual machines in the order of virtual machines having a large number of slots occupied when the calculated usage deviation is less than a threshold value, Allocating the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of one or more first unallocated virtual machines that are not primarily reallocated to the plurality of slots, And when the calculated usage deviation is equal to or greater than the threshold value, Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having a larger usage amount, and sharing at least one slot in the case of the one or more second unallocated virtual machines, And secondarily reallocating the plurality of slots.
상기 사용량 편차를 계산하는 단계는 상기 결정한 사용량 중에서, 최소 사용량 및 최대 사용량을 결정하는 단계, 그리고 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 단계를 포함한다.The calculating of the usage deviation may include determining a minimum usage amount and a maximum usage amount among the determined usage amounts, and calculating the usage amount variation by dividing the maximum usage amount by the minimum usage amount.
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계는 각 가상 머신들이 차지하는 슬롯 수를 결정하는 단계, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, In the case of machines, the step of secondary reallocating the plurality of slots to the first unallocated virtual machines to share at least one slot comprises the steps of determining the number of slots occupied by each virtual machine, Sequentially reallocating the plurality of slots in a linear manner so that there are no slots that are shared with each other, and in the case of the first unallocated virtual machines, Lt; RTI ID = 0.0 > a < / RTI > least recently reallocated virtual machine A step being.
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는 상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.The step of sequentially and primarily reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the virtual machines having the largest number of slots occupies, And for the first unassigned virtual machines to allocate the slots to share a slot with the least recently reallocated virtual machine among the virtual machines that have been primarily reassigned to the plurality of slots The secondary reallocation step re-allocates the second unallocated virtual machines from the rightmost slot among the plurality of slots.
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, The step of reallocating the plurality of slots so as to share at least one slot in the case of the allocation virtual machines includes sequentially allocating the plurality of slots in a linear manner so that there is no slot shared by the determined virtual machines And allocating the plurality of slots to the second virtual machine to share the slot with the virtual machine having the lowest usage among the virtual machines that are primarily reallocated to the plurality of slots in the case of the second unallocated virtual machines. And reassigning the data.
상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the step of sequentially and primarily reallocating the plurality of slots so that there is no slot shared by the virtual machines in order of the determined usage amount comprises: Allocating the plurality of slots to the second virtual machine to share the slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots in the case of the second unallocated virtual machines. In the case of the second unallocated virtual machines, the secondary reallocation step reallocally secondaryly allocates from the rightmost slot among the plurality of slots.
본 발명에 따르면, 가상 머신들의 컨텍스트 전환 시 발생하는 불필요한 슬롯의 복사를 최소화할 수 있는바, 컨텍스트 전환 비용을 감소시키고 전체 GPU 가상화 시스템의 성능을 향상시킬 수 있다.According to the present invention, it is possible to minimize unnecessary duplication of slots occurring in the context switching of virtual machines, thereby reducing the context switching cost and improving the performance of the entire GPU virtualization system.
도 1은 한 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치를 설명하는 도면이다.
도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.
도 4는 종래 기술에 따른 가상 GPU 메모리 할당방법과 본 발명의 실시예에 따른 가상 GPU 메모리 재할당 방법을 비교한 도면이다.
도 5는 본 발명의 실시예에 따른 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법을 설명하는 도면이다.1 is a diagram illustrating a computing device that relocates a slot included in a virtual GPU memory according to an embodiment to a plurality of virtual machines.
FIGS. 2 and 3 are diagrams for explaining a specific method of reallocating slots of a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.
FIG. 4 is a diagram comparing a method of allocating a virtual GPU according to the prior art and a method of reallocating a virtual GPU according to an embodiment of the present invention.
5 is a diagram illustrating a method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when an element is referred to as "comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.
도 1은 한 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치를 설명하는 도면이고, 도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.FIG. 1 is a diagram illustrating a computing apparatus for reallocating a slot included in a virtual GPU memory according to an embodiment to a plurality of virtual machines. FIGS. 2 and 3 illustrate a memory reallocation unit according to an embodiment, FIG. 5 is a diagram illustrating a specific method of reallocating a slot of a memory to a plurality of virtual machines.
도 1을 참고하면, 컴퓨팅 장치(1000)는 가상 GPU 메모리(100), 복수의 가상 머신들(200) 및 메모리 재할당부(300)를 포함한다.Referring to FIG. 1, a
컴퓨팅 장치(1000)는 가상 GPU 메모리(100) 및 가상 머신들(200)을 이용하여 가상화 시스템을 구현한다. 가상화 시스템이란 컴퓨팅 장치(1000)가 포함하는 물리적인 하드웨어를 다수의 가상 하드웨어로 구분하여 다수의 운영체제를 운영하기 위한 것으로, 컴퓨팅 장치(1000)는 소프트웨어적으로 구현된 가상 GPU 메모리(100)를 각각이 특정 작업을 수행하는 가상 머신들(200)에 할당하여 가상화 시스템을 구현한다.The
가상 GPU 메모리(100)는 컴퓨팅 장치(1000)에서 다수의 운영체제를 운영하기 위해 물리적인 GPU 메모리를 소프트웨어적으로 분할하여 구현한 것으로서, 컴퓨팅 장치(1000) 내 가상화 시스템에 구현된다.The virtual GPU memory 100 is implemented in a virtualization system in the
가상 GPU 메모리(100)는 복수의 슬롯들을 포함하며, 가상 GPU 메모리(100)의 적어도 하나의 슬롯은 가상 머신들(200)에 할당된다.The virtual GPU memory 100 includes a plurality of slots, and at least one slot of the virtual GPU memory 100 is allocated to the
가상 머신들(200)은 서로 상이한 비율로 가상 GPU 메모리(100)를 공유할 수 있다. 예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제1 가상 머신(210)은 가상 GPU 메모리(100)의 3개의 슬롯을 차지하며, 제2 가상 머신(220)은 가상 GPU 메모리(100)의 2개의 슬롯을 차지하며, 제3 가상 머신(230)은 가상 GPU 메모리(100)의 1개의 슬롯을 차지하며, 제4 가상 머신(240)은 가상 GPU 메모리(100)의 4개의 슬롯을 차지할 수 있다.The
가상 GPU 메모리(100)의 특정 슬롯이 복수의 가상 머신들(200)에 의해 공유되는 경우, 컨텍스트 전환 시 해당 특정 슬롯의 컨텍스트의 복사가 발생한다. 이 경우, 슬롯의 복사는 슬롯 자체의 내용의 복사가 아닌, 슬롯에 해당하는 컨텍스트의 GTT(Graphics Translation Table)의 복사를 의미한다.When a specific slot of the virtual GPU memory 100 is shared by a plurality of
예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제1 가상 머신(210)과 제2 가상 머신(220)의 경우 가상 GPU 메모리(100)의 가장 좌측 2개의 슬롯을 공유한다. 이 경우, 제1 가상 머신(210)은 할당된 작업을 수행하기 위해 가상 GPU 메모리(100)의 제1 슬롯(110) 내지 제3 슬롯(130)에 접근하며, 이후 제2 가상 머신(220)이 할당된 작업을 수행하기 위해 제1 슬롯(110) 및 제2 슬롯(120)에 접근한다. 제2 가상 머신(220)이 제1 슬롯(110) 및 제2 슬롯(120)에 접근할 때, 제1 슬롯(110) 및 제2 슬롯(120)에는 이전에 접근한 제1 가상 머신(210)에 대한 정보가 들어가 있으므로, 제2 가상 머신(220)에 대한 정보를 복사하기 위해 제1 슬롯(110) 및 제2 슬롯(120)에서 슬롯의 복사를 수행한다.For example, in FIG. 1, the leftmost two slots of the virtual GPU memory 100 in the case of the first
반대로, 가상 GPU 메모리(100)의 특정 슬롯이 복수의 가상 머신들(200)에 의해 공유되지 않는 경우, 컨텍스트 전환 시 해당 특정 슬롯의 복사가 발생하지 않는다.In contrast, when a specific slot of the virtual GPU memory 100 is not shared by a plurality of
예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제4 슬롯(140)의 경우 제3 가상 머신(230)에 단독으로 할당되며, 제5 슬롯(150) 내지 제8 슬롯(180)의 경우 제4 가상 머신(240)에 단독으로 할당되는바, 컨텍스트 전환시 제4 슬롯(140) 내지 제8 슬롯(180)에서는 슬롯의 복사가 발생하지 않는다.For example, in FIG. 1, before the virtual GPU memory 100 is reallocated, in the case of the
가상 머신들(200)은 가상 GPU 메모리(100)의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 가상 GPU 메모리(100)를 사용하여 각 가상 머신에 할당된 작업을 수행한다.The
한편, 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량은 각 가상 머신이 할당된 작업을 수행하기 위해 물리 GPU에서 동작하는 시간의 측정값에 의해 결정된다.On the other hand, the usage amount of the
메모리 재할당부(300)는 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량을 결정하고, 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다. 또한, 메모리 재할당부(300)는 계산한 사용량 편차가 임계값 미만인 경우 차지하는 슬롯 수가 많은 가상 머신 순으로 복수의 슬롯들을 1차적으로 재할당하고, 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 복수의 슬롯들을 제1 미할당 가상 머신들에 2차적으로 재할당한다. 또한, 메모리 재할당부(300)는 계산한 사용량 편차가 임계값 이상인 경우 결정한 사용량이 큰 가상 머신 순으로 복수의 슬롯들을 1차적으로 재할당하고, 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 복수의 슬롯들을 2차적으로 재할당한다.The
이 때, 메모리 재할당부(300)는 하드웨어인 컴퓨팅 장치(1000)와 결합되어 실행되기 위해 프로그램(또는 어플리케이션)으로 구현되어 컴퓨터 판독 가능한 기록 매체에 저장될 수 있다.In this case, the memory re-assign
컴퓨터 판독 가능한 기록 매체는, 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 디바이스에 의해 판독 가능한 매체를 의미한다. 기록 매체의 예시로서, ROM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있지만, 이에 제한되지 않는다. 즉, 본 발명의 실시예에 따른 메모리 재할당부(300)는 컴퓨터가 접속할 수 있는 다양한 서버 상의 다양한 기록매체 또는 사용자의 상기 컴퓨터상의 다양한 기록매체에 저장될 수 있다.The computer-readable recording medium is not a medium for storing data for a short time such as a register, a cache, a memory, etc., but means a medium that semi-permanently stores data and is readable by the device. Examples of the recording medium include, but are not limited to, ROM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. That is, the
우선, 메모리 재할당부(300)는 가상 머신들(200)에 접근하여 가상 머신들(200) 각각의 가상 GPU 메모리(100) 사용량을 결정한다.First, the
이후, 메모리 재할당부(300)는 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다.Thereafter, the
구체적으로, 메모리 재할당부(300)는 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 최대 사용량을 최소 사용량으로 나누어 사용량 편차를 계산한다.Specifically, the
메모리 재할당부(300)는 계산한 사용량 편차를 임계값과 비교하여, 사용량 편차가 임계값 미만인 경우 가상 머신들(200)에 할당된 가상 GPU 메모리(100)의 슬롯 수에 따라 가상 GPU 메모리(100)의 슬롯을 가상 머신들(200)에 재할당하고, 사용량 편차가 임계값 이상인 경우 가상 머신들(200)의 사용량에 따라 가상 GPU 메모리(100)의 슬롯을 가상 머신들(200)에 재할당하여, 가상 GPU 메모리(100)의 슬롯을 공유하는 가상 머신 수의 합이 최소가 되도록한다. 이 경우, 임계값은 1.1일 수 있다.The
도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.FIGS. 2 and 3 are diagrams for explaining a specific method of reallocating slots of a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.
도 2를 참고하면, 사용량 편차가 임계값 미만인 경우, 메모리 재할당부(300)는 가상 GPU 메모리(100)에서 각 가상 머신이 차지하는 슬롯 수를 결정한다. 예를 들면, 메모리 재할당부(300)는 제1 가상 머신(210), 제2 가상 머신(220), 제3 가상 머신(230) 및 제4 가상 머신(240)이 차지하는 슬롯 수를 각각 3개, 2개, 1개 및 4개로 결정할 수 있다.Referring to FIG. 2, when the usage deviation is less than the threshold value, the
또한, 메모리 재할당부(300)는 차지하는 슬롯 수가 많은 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯들을 1차적으로 재할당한다. 이 경우, 가상 머신들(200)은 서로 공유하는 슬롯이 없도록 가상 GPU 메모리(100)의 슬롯을 연속적으로 재할당받고, 차지하는 슬롯 수가 많은 가상 머신 순으로 가장 좌측 슬롯부터 재할당받을 수 있다.In addition, the
예를 들면, 메모리 재할당부(300)는 제4 가상 머신(240), 제1 가상 머신(210), 제2 가상 머신(220) 및 제3 가상 머신(230) 순으로 서로 공유하는 슬롯이 없도록 슬롯을 1차적으로 재할당한다. 즉, 메모리 재할당부(300)는 제4 가상 머신(240)이 제1 슬롯(110) 내지 제4 슬롯(140)을 차지하고, 제1 가상 머신(210)이 제5 슬롯(150) 내지 제7 슬롯(170)을 차지하고, 제2 가상 머신(220)이 제8 슬롯(180) 및 제9 슬롯(190)을 차지하도록 가상 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 재할당할 수 있다.For example, the
만일 가상 GPU 메모리(100) 내 슬롯이 부족하여 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신이 있는 경우, 메모리 재할당부(300)는 슬롯을 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 사용하는 가상 머신과 슬롯을 공유하도록 슬롯들을 2차적으로 재할당한다. 이 경우, 미할당 가상 머신 중 슬롯을 가장 많이 사용하는 미할당 가상 머신은 가장 우측 슬롯을 사용하도록 배치하고, 나머지 미할당 가상 머신들은 모든 슬롯을 해당 가상 머신과 공유하되, 해당 가상 머신이 차지하는 슬롯 중 가장 좌측 슬롯을 포함하도록 할 수 있다.If there is an unassigned virtual machine that is not primarily reallocated due to insufficient slots in the virtual GPU memory 100, the
예를 들면, 도 2에서, 가상 GPU 메모리(100)의 슬롯이 9개인 관계로 제3 가상 머신(230)은 슬롯을 재할당받지 못한다. 따라서, 메모리 재할당부(300)는 제3 가상 머신(230)이 슬롯을 가장 적게 재할당받은 제2 가상 머신(220)과 슬롯을 공유하도록 2차적으로 재할당할 수 있다. 이 경우, 제3 가상 머신(230)과 제2 가상 머신(220)은 가장 우측 슬롯인 제9 슬롯(190)을 공유하며, 컨텍스트 전환시 제9 슬롯(190)에서만 슬롯의 복사가 발생한다.For example, in FIG. 2, because the slots of the virtual GPU memory 100 are nine, the third
사용량 편차가 임계값 미만인 경우, 제1 가상 머신(210) 내지 제4 가상 머신(240)의 가상 GPU 메모리(100) 사용량은 거의 동일한바, 각 가상 머신이 가상 GPU 메모리(100)에 접근하는 빈도 또한 거의 동일하다. 따라서, 이 경우 가상 머신들(200)에 의해 공유되는 슬롯이 최소화되도록 가성 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 재할당하여 컨텍스트 전환시 발생하는 슬롯의 복사를 최소화한다.The amount of usage of the virtual GPU memory 100 of the first
도 3을 참고하면, 사용량 편차가 임계값 이상인 경우, 메모리 재할당부(300)는 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당한다. 이 경우, 가상 머신들(200)은 서로 공유하는 슬롯이 없도록 가상 GPU 메모리(100)의 슬롯을 연속적으로 재할당받는다. 이 경우, 메모리 재할당부(300)는 가장 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 가장 좌측 슬롯부터 순차적으로 재할당할 수 있다.Referring to FIG. 3, when the usage deviation is equal to or greater than the threshold value, the
예를 들면, 제1 가상 머신(210), 제2 가상 머신(220), 제4 가상 머신(240) 및 제3 가상 머신(230)순으로 가상 GPU 메모리(100)의 사용량이 큰 경우, 메모리 재할당부(300)는 제1 가상 머신(210)이 제1 슬롯(110) 내지 제3 슬롯(130)을 차지하고, 제2 가상 머신(220)이 제4 슬롯(140) 및 제5 슬롯(150)을 차지하고, 제4 가상 머신(240)이 제6 슬롯(180) 내지 제9 슬롯(190)을 차지하도록 가상 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당할 수 있다.For example, when the amount of usage of the virtual GPU memory 100 is large in the order of the first
만일 가상 GPU 메모리(100) 내 슬롯이 부족하여 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신이 있는 경우, 메모리 재할당부(300)는 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당받은 가상 머신 중에서, 가장 적은 사용량을 가진 가상 머신과 슬롯을 공유하도록 슬롯을 할당받지 못한 가상 머신에 슬롯들을 2차적으로 재할당한다. 이 경우, 슬롯을 1차적으로 재할당받지 못한 가상 머신은 가장 우측 슬롯을 공유할 수 있다.If there is an unassigned virtual machine that is not primarily reallocated due to insufficient slots in the virtual GPU memory 100, the
예를 들면, 도 3에서, 가상 GPU 메모리(100)의 슬롯이 9개인 관계로 제3 가상 머신(230)은 슬롯을 1차적으로 재할당받지 못한다. 따라서, 메모리 재할당부(300)는 제3 가상 머신(230)이 슬롯이 재할당된 가상 머신 중 가장 적은 사용량을 가진 제4 가상 머신(240)과 슬롯을 공유하도록 2차적으로 재할당할 수 있다. 이 경우, 제3 가상 머신(230)과 제4 가상 머신(240)은 가장 우측 슬롯인 제9 슬롯(190)을 공유하며, 컨텍스트 전환시 제9 슬롯(190)에서만 슬롯의 복사가 발생한다.For example, in FIG. 3, the slot number of the virtual GPU memory 100 is nine, so that the third
사용량 편차가 임계값 이상인 경우, 제1 가상 머신(210) 내지 제4 가상 머신(240)의 가상 GPU 메모리(100) 사용량은 차이가 있고, 가상 GPU 메모리(100) 사용량이 큰 가상 머신일수록 가상 GPU 메모리(100)에 접근하는 빈도가 크다. 만일 가상 GPU 메모리(100)에 자주 접근하는 가상 머신들이 슬롯을 공유하는 경우, 슬롯의 복사가 빈번하게 발생하여 시스템 내 연산량이 증가하게 된다.The use amount of the virtual GPU memory 100 of the first
따라서, 가상 GPU 메모리(100) 사용량이 적은 가상 머신들이 슬롯을 공유하도록 가상 머신들(200)에 가상 GPU 메모리(100)를 재할당하는 경우, 컨텍스트 전환시 발생하는 슬롯의 복사를 최소화할 수 있다.Accordingly, when the virtual GPU memory 100 is reallocated to the
도 4는 종래 기술에 따른 가상 GPU 메모리 할당방법과 본 발명의 실시예에 따른 가상 GPU 메모리 재할당 방법을 비교한 도면이다.FIG. 4 is a diagram comparing a method of allocating a virtual GPU according to the prior art and a method of reallocating a virtual GPU according to an embodiment of the present invention.
도 4 (a)를 참고하면, 종래 기술의 경우, 가상 머신들(400)이 일괄적으로 동일한 수의 슬롯을 공유하도록 가상 GPU 메모리(100)의 슬롯이 할당된다. 이 경우, 컨텍스트 전환시 제1 가상 머신(410), 제2 가상 머신(420), 제3 가상 머신(430) 및 제4 가상 머신(440)에 의해 각각 6번의 슬롯의 복사가 발생하므로 총 24회의 슬롯의 복사가 발생한다.Referring to FIG. 4A, in the prior art, a slot of the virtual GPU memory 100 is allocated so that the virtual machines 400 collectively share the same number of slots. In this case, six slots are copied by the first
그러나, 도 4 (b)를 참고하면, 본 발명의 실시예에 따라 제1 가상 머신(410), 제3 가상 머신(430) 및 제4 가상 머신(440)이 동일한 슬롯을 공유하고, 제2 가상 머신(220)이 슬롯을 단독으로 할당받도록 재할당하는 경우, 컨텍스트 전환시 제2 가상 머신(220)을 제외한 제1 가상 머신(410), 제3 가상 머신(430) 및 제4 가상 머신(440)에 의해 각각 6번의 슬롯의 복사가 발생하므로 총 18회의 슬롯의 복사가 발생하여 종래 기술에 비해 적은 수의 슬롯의 복사가 발생한다.However, referring to FIG. 4 (b), the first
따라서, 본 발명의 실시예에 의하면 종래 기술보다 적은 수의 슬롯의 복사가 발생하는바, 가상화 시스템 내에서 슬롯의 복사로 인한 연산량이 감소한다.Thus, according to embodiments of the present invention, fewer slots of copying occur than in the prior art, which reduces the amount of computation due to slot copying within the virtualization system.
도 5는 본 발명의 실시예에 따른 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법을 설명하는 도면이다.5 is a diagram illustrating a method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.
도 5를 참고하면, 컴퓨팅 장치(1000)는 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량을 결정한다(S100).Referring to FIG. 5, the
컴퓨팅 장치(1000)는 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다(S110).The
구체적으로, 컴퓨팅 장치(1000)는 최소 사용량 및 최대 사용량을 결정하고, 최대 사용량을 최소 사용량으로 나누어 사용량 편차를 계산한다.Specifically, the
컴퓨팅 장치(1000)는 계산한 사용량 편차가 임계값 미만인지 확인한다(S120).The
만일 사용량 편차가 임계값 미만인 경우, 컴퓨팅 장치(1000)는 슬롯이 적게 할당된 가상 머신들이 슬롯을 공유하도록 슬롯들을 가상 머신들(200)에 재할당한다.If the usage deviation is below the threshold, the
구체적으로, 컴퓨팅 장치(1000)는 가상 GPU 메모리(100)에서 각 가상 머신에 할당된 슬롯 수를 결정하고(S130), 차지하는 슬롯 수가 많은 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯들을 1차적으로 재할당한다(S131). 이 경우, 컴퓨팅 장치(1000)는 서로 공유하는 슬롯이 없도록 연속적으로 슬롯들을 할당할 수 있다.Specifically, the
또한, 컴퓨팅 장치(1000)는 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 슬롯을 2차적으로 재할당한다(S133).In addition, in the case of an unassigned virtual machine in which the slot is not primarily reallocated, the
이 경우, 컴퓨팅 장치(1000)는 차지하는 슬롯 수가 많은 가상 머신 순으로 가장 좌측 슬롯부터 1차적으로 재할당하고, 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 가장 많이 사용하는 미할당 가상 머신은 가장 우측 슬롯을 사용하도록 재할당하고, 나머지 미할당 가상 머신들은 모든 슬롯을 해당 가상 머신과 공유하되, 해당 가상 머신이 차지하는 슬롯 중 가장 좌측 슬롯을 포함하도록 2차적으로 재할당할 수 있다.In this case, the
만일 사용량 편차가 임계값 이상인 경우, 컴퓨팅 장치(1000)는 결정한 사용량이 적은 가상 머신들이 슬롯을 공유하도록 슬롯들을 가상 머신들(200)에 재할당한다.If the usage deviation is above the threshold, the
구체적으로, 컴퓨팅 장치(1000)는 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당한다(S140). 이 경우, 컴퓨팅 장치(1000)는 서로 공유하는 슬롯이 없도록 연속적으로 슬롯들을 할당할 수 있다.Specifically, the
또한, 컴퓨팅 장치(1000)는 슬롯을 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 1차적으로 재할당받은 가상 머신들 중에서 가장 적은 사용량을 가진 가상 머신과 슬롯을 공유하도록 슬롯을 2차적으로 재할당한다(S141).In addition, in the case of an unassigned virtual machine in which slots are not reallocated, the
이 경우, 컴퓨팅 장치(1000)는 사용량이 큰 가상 머신 순으로 가장 좌측 슬롯부터 1차적으로 재할당하고, 슬롯을 재할당받지 못한 미할당 가상 머신의 경우, 가장 우측 슬롯을 공유하도록 2차적으로 재할당할 수 있다.In this case, the
본 발명에 따르면, 가상 머신들의 컨텍스트 전환 시 발생하는 불필요한 슬롯의 복사를 최소화할 수 있는바, 컨텍스트 전환 비용을 감소시키고 전체 GPU 가상화 시스템의 성능을 향상시킬 수 있다.According to the present invention, it is possible to minimize unnecessary duplication of slots occurring in the context switching of virtual machines, thereby reducing the context switching cost and improving the performance of the entire GPU virtualization system.
이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다.The embodiments of the present invention described above are not implemented only by the apparatus and method, but may be implemented through a program for realizing the function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded.
이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.
Claims (12)
복수의 슬롯들을 포함하는 가상 GPU 메모리,
상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고
메모리 재할당부를 포함하며,
상기 메모리 재할당부는
상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 각 가상 머신이 차지하는 슬롯 수를 결정하고, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 컴퓨팅 장치.A computing device for reassigning a slot contained in a virtual GPU memory to a plurality of virtual machines,
A virtual GPU memory including a plurality of slots,
A plurality of virtual machines assigned at least one slot among the plurality of slots and performing an assigned task using the virtual GPU memory,
A memory reallocation unit,
The memory reallocation unit
Determining a usage amount of the plurality of virtual machines using the virtual GPU memory, calculating a usage deviation of the plurality of virtual machines using the determined usage amount,
Determining a number of slots occupied by each virtual machine when the calculated usage deviation is less than a threshold value and sequentially reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the number of slots occupied, In the case of one or more first unallocated virtual machines in which the plurality of slots are not primarily reallocated, a virtual machine and a slot that have been reallocated at least among the virtual machines that have been primarily reallocated to the plurality of slots Re-allocating the plurality of slots to share,
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines.
상기 메모리 재할당부는
상기 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 컴퓨팅 장치.The method of claim 1,
The memory reallocation unit
Wherein the computing unit determines the minimum usage amount and the maximum usage amount among the usage amounts determined and divides the maximum usage amount by the minimum usage amount to calculate the usage amount deviation.
상기 메모리 재할당부는
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고,
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 컴퓨팅 장치.The method of claim 1,
The memory reallocation unit
And reallocating the slots from the leftmost slot among the plurality of slots in order of virtual machines having the largest number of slots,
Allocates the second unallocated virtual machines to the second slot from the rightmost slot among the plurality of slots.
복수의 슬롯들을 포함하는 가상 GPU 메모리,
상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고
메모리 재할당부를 포함하며,
상기 메모리 재할당부는
상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하며, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 컴퓨팅 장치.A computing device for reassigning a slot contained in a virtual GPU memory to a plurality of virtual machines,
A virtual GPU memory including a plurality of slots,
A plurality of virtual machines assigned at least one slot among the plurality of slots and performing an assigned task using the virtual GPU memory,
A memory reallocation unit,
The memory reallocation unit
Determining a usage amount of the plurality of virtual machines using the virtual GPU memory, calculating a usage deviation of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Allocating the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines,
Wherein when the calculated usage deviation is equal to or greater than the threshold value, the plurality of slots are primarily and continuously reallocated so that there is no slot shared by the determined virtual machines in ascending order of virtual machines, In the case of one or more second unallocated virtual machines that have not been allocated, the plurality of slots may be quadratically divided to share a slot with the virtual machine having the lowest usage amount among the virtual machines that have been primarily reallocated to the plurality of slots A computing device that reassigns.
상기 메모리 재할당부는
상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고,
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 컴퓨팅 장치.The method of claim 5,
The memory reallocation unit
And reallocating the slots from the leftmost slot among the plurality of slots,
And secondarily reallocates the second unallocated virtual machines from the rightmost slot among the plurality of slots.
상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계,
상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계는
각 가상 머신들이 차지하는 슬롯 수를 결정하는 단계,
차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계
를 포함하는 슬롯 재할당 방법.CLAIMS What is claimed is: 1. A method for reassigning a plurality of slots, included in a virtual GPU memory, to a plurality of virtual machines, the computing device comprising one or more processors,
Determining a usage amount of the virtual machines using the virtual GPU memory,
Calculating usage deviations of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Reassigning the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines, and
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, In the case of machines, the step of secondarily reallocating the plurality of slots to the first unallocated virtual machines to share at least one slot
Determining the number of slots occupied by each virtual machine,
Sequentially reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the number of slots occupied; and
In the case of the first unallocated virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with a virtual machine having the least reallocated slots among the virtual machines that have been primarily reallocated to the plurality of slots step
Lt; / RTI >
상기 사용량 편차를 계산하는 단계는
상기 결정한 사용량 중에서, 최소 사용량 및 최대 사용량을 결정하는 단계, 그리고
상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 단계
를 포함하는 슬롯 재할당 방법.8. The method of claim 7,
The step of calculating the usage deviation
Determining a minimum usage amount and a maximum usage amount among the determined usage amounts, and
Dividing the maximum usage amount by the minimum usage amount, and calculating the usage amount deviation
Lt; / RTI >
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고,
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 슬롯 재할당 방법.8. The method of claim 7,
The step of sequentially and primarily reassigning the plurality of slots so that there is no slot shared by the virtual machines in the order of
Allocating a virtual left slot of the plurality of slots in a virtual machine order having a larger number of slots,
In the case of the first unallocated virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with a virtual machine having the least reallocated slots among the virtual machines that have been primarily reallocated to the plurality of slots The step
And allocating the second unallocated virtual machines from the rightmost slot among the plurality of slots.
상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계,
상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계
를 포함하는 슬롯 재할당 방법.CLAIMS What is claimed is: 1. A method for reassigning a plurality of slots, included in a virtual GPU memory, to a plurality of virtual machines, the computing device comprising one or more processors,
Determining a usage amount of the virtual machines using the virtual GPU memory,
Calculating usage deviations of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Reassigning the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines, and
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines,
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, In the case of allocation virtual machines, the step of secondary reallocating the plurality of slots to share at least one slot
Sequentially reallocating the plurality of slots so that there is no slot shared with each other in the ascending order of virtual machines; and
Allocating the plurality of slots to the second virtual machine, wherein the second unallocated virtual machines share the slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots
Lt; / RTI >
상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는
상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고,
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 슬롯 재할당 방법.12. The method of claim 11,
Wherein the step of sequentially and primarily reassigning the plurality of slots so that there is no slot shared by the determined virtual machines
Allocating a virtual left slot of the plurality of slots to the virtual left slot,
Allocating the plurality of slots to the second virtual machine, wherein the second unallocated virtual machines share the slot with the virtual machine having the lowest usage amount among the virtual machines that have been primarily reallocated to the plurality of slots The
And in the case of the second unallocated virtual machines, reallocally from the rightmost slot among the plurality of slots.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180082289A KR101932522B1 (en) | 2018-07-16 | 2018-07-16 | Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180082289A KR101932522B1 (en) | 2018-07-16 | 2018-07-16 | Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101932522B1 true KR101932522B1 (en) | 2018-12-26 |
Family
ID=65006467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180082289A KR101932522B1 (en) | 2018-07-16 | 2018-07-16 | Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101932522B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220035626A (en) * | 2020-09-14 | 2022-03-22 | 한화시스템 주식회사 | Method for managing gpu resources and computing device for executing the method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011041615A1 (en) | 2009-09-30 | 2011-04-07 | Citrix Systems, Inc. | Dynamic reallocation of physical memory responsive to virtual machine events |
US20140176583A1 (en) * | 2012-12-20 | 2014-06-26 | Vmware, Inc. | Dynamic allocation of physical graphics processing units to virtual machines |
KR101661783B1 (en) | 2009-03-26 | 2016-10-10 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Virtual non-uniform memory architecture for virtual machines |
US20160358305A1 (en) | 2015-06-07 | 2016-12-08 | Apple Inc. | Starvation free scheduling of prioritized workloads on the gpu |
-
2018
- 2018-07-16 KR KR1020180082289A patent/KR101932522B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101661783B1 (en) | 2009-03-26 | 2016-10-10 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Virtual non-uniform memory architecture for virtual machines |
WO2011041615A1 (en) | 2009-09-30 | 2011-04-07 | Citrix Systems, Inc. | Dynamic reallocation of physical memory responsive to virtual machine events |
US20140176583A1 (en) * | 2012-12-20 | 2014-06-26 | Vmware, Inc. | Dynamic allocation of physical graphics processing units to virtual machines |
US20160358305A1 (en) | 2015-06-07 | 2016-12-08 | Apple Inc. | Starvation free scheduling of prioritized workloads on the gpu |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220035626A (en) * | 2020-09-14 | 2022-03-22 | 한화시스템 주식회사 | Method for managing gpu resources and computing device for executing the method |
KR102417882B1 (en) | 2020-09-14 | 2022-07-05 | 한화시스템 주식회사 | Method for managing gpu resources and computing device for executing the method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11157306B2 (en) | Faster access of virtual machine memory backed by a host computing device's virtual memory | |
US10089026B1 (en) | Virtual drive based RAID groups | |
KR101137172B1 (en) | System, method and program to manage memory of a virtual machine | |
US9223709B1 (en) | Thread-aware cache memory management | |
US10534720B2 (en) | Application aware memory resource management | |
US9336147B2 (en) | Cache and memory allocation for virtual machines | |
KR102290540B1 (en) | Namespace/Stream Management | |
US9329780B2 (en) | Combining virtual mapping metadata and physical space mapping metadata | |
US7590816B2 (en) | Computer system, management computer and storage system, and storage area allocation amount controlling method | |
JP6678230B2 (en) | Storage device | |
CN103577345A (en) | Methods and structure for improved flexibility in shared storage caching by multiple systems | |
US8332611B2 (en) | Method and system for managing memory | |
JP2004192612A (en) | Power saving in segmented data processing system | |
KR20120000066A (en) | Virtual non-uniform memory architecture for virtual machines | |
CN104572656A (en) | Method and device for recycling space of disk mirror image | |
US20210026762A1 (en) | Virtualization of multiple coprocessor memory | |
CN112241320A (en) | Resource allocation method, storage device and storage system | |
US11803423B1 (en) | Dynamic allocation of resources | |
KR101072807B1 (en) | System for hypervisor | |
US20090037685A1 (en) | Fair memory resource control for mapped memory | |
KR101932522B1 (en) | Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same | |
US9015418B2 (en) | Self-sizing dynamic cache for virtualized environments | |
US10664393B2 (en) | Storage control apparatus for managing pages of cache and computer-readable storage medium storing program | |
CN110447019B (en) | Memory allocation manager and method for managing memory allocation performed thereby | |
US9811260B2 (en) | System and method for ballooning with assigned devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |