# US 9,519,573 B2 · Creating a software performance testing environment on a virtual machine system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,519,573 B2
- Document ID: US9519573B2
- Status: Granted
- Kind: B2
- Application number: 14/747,703
- Filed: 2015-06-23
- Published: 2015-10-15
- Granted: 2016-12-13
- Earliest claimed: 2014-03-31
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Xin Hao Cheng; Guo Qiang Hu; Jun Chi Yan; Jun Zhu
- Web page: https://patentgrep.com/patent/US9519573B2

## CPC

- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 3/0601: {Interfaces specially adapted for storage systems}
- G06F 3/0611: {in relation to response time}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0689: {Disk arrays, e.g. RAID, JBOD}
- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/4887: {involving deadlines, e.g. rate based, periodic}
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/301: {where the computing system is a virtual computing platform, e.g. logically partitioned systems (virtual machines G06F9/45533; logical partitioning of resources G06F9/5077)}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3037: {where the computing system component is a memory, e.g. virtual memory, cache (accessing, addressing or allocating within memory systems or architectures G06F12/00; checking stores for correct operation G11C29/00)}
- G06F 11/3051: {Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs (verification or detection of system hardware configuration G06F11/2247)}
- G06F 11/3419: {by assessing time}
- G06F 11/3485: {for I/O devices}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 2009/45591: {Monitoring or debugging support}
- G06F 2201/815: Virtual
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for creating a software performance testing environment based on a virtual machine, wherein the method comprises: in response to obtaining a hard disk read/write request triggered by a virtual CPU of the virtual machine, notifying a virtual CPU scheduler to record a CPU time quota t1 already consumed by the virtual CPU in a current CPU schedule period; in response to detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, predicting a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment; notifying the virtual CPU scheduler to determine a CPU time quota already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time quota t1 and the hard disk read/write latency t; and adjusting a system clock of the virtual machine based on the determined CPU time quota already consumed by the virtual CPU in the current CPU schedule period. The method may obtain, in the created software performance testing environment, a software performance testing result consistent with the result obtained under a highly configured server in the target environment.

## Claims

### Claim 1

A method for creating a software performance testing environment on a virtual machine system, the virtual machine system running at least one virtual machine (VM) on a single hardware platform, the single hardware platform having a central processor unit (CPU) configured to simulate a target environment on which software is to be run, said method comprising:
obtaining, at the CPU, a hard disk read/write request triggered by a virtual CPU of the virtual machine, and in response to obtaining said triggered request, notifying a virtual CPU scheduler to record a CPU time duration t1 already consumed by the virtual CPU in a current CPU schedule period, said time duration t1 having a corresponding physical CPU processing time consumed by the VM;
in response to detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, predicting, by the CPU, a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment, said latency t based a time when the hard disk read/write processing is completed;
notifying, by the CPU, the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time duration t1 and the predicted hard disk read/write latency t; and
adjusting, by the CPU, a system clock of the virtual machine forward based on the determined CPU processing time already consumed by the virtual CPU in the current CPU schedule period,
wherein in response to said detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, said predicting a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment comprises:
determining that the hard disk read/write request belongs to a hard disk read/write request that would not occur in the target environment, and predicting that, in the target environment, the hard disk read/write latency t corresponding to the hard disk read/write request is equal to 0,
wherein the determining that the hard disk read/write request belongs to a hard disk read/write request that would not occur in the target environment comprises:
determining from the memory access request a virtual memory address of the content to be accessed,
querying a virtual memory address mapping table maintained by a memory manager to determine, whether the virtual memory address is mapped to the physical memory address of the virtual machine system; and
if determined that the virtual memory address is not mapped to the physical memory address of the virtual machine system, it is determined that the memory access request needs the physical machine for the virtual machine to perform the hard disk read/write operation; and
wherein in response to obtaining a hard disk read/write request triggered by a virtual CPU of the virtual machine, and said notifying a virtual CPU scheduler to record a CPU time duration t1 already consumed by the virtual CPU in a current CPU schedule period comprises:
notifying the virtual CPU scheduler to cause the virtual CPU to suspend its work; and
wherein said determining that the hard disk read/write request belongs to a hard disk read/write request that would not occur in the target environment, and predicting that, in the target environment, the hard disk read/write latency t corresponding to the hard disk read/write request is equal to 0 further comprises:
notifying the virtual CPU scheduler to cause the suspended virtual CPU to resume its work;
wherein said notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time duration t1 and the hard disk read/write latency t comprises:
notifying the virtual CPU scheduler to set the CPU processing time already consumed by the virtual CPU in the current CPU schedule period to t1.

### Claim 2 (depends on 1)

The method according to claim 1, wherein said in response to detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, predicting a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment comprises: determining, by said CPU, that the hard disk read/write request belongs to a hard disk read/write request that would occur in the target environment, and predicting the hard disk read/write latency t corresponding to the hard disk read/write request in the target environment based on a time when the hard disk read/write processing is completed, wherein said determining that the hard disk read/write request belongs to a hard disk read/write request that would occur in the target environment comprises:
determining from the memory access request a virtual memory address of the content to be accessed,
querying a virtual memory address mapping table of the target environment maintained in a virtual machine manager to determine whether the virtual memory address is mapped to the physical memory address of the target environment; and if the virtual memory address is mapped to the physical memory address of the target environment, it is determined that the memory access request does need the hard disk read/write operation to be performed in the target environment.

### Claim 3 (depends on 1)

The method according to claim 1, wherein said determining that the hard disk read/write request belongs to a hard disk read/write request that would occur in the target environment, and predicting a hard disk read/write latency t corresponding to the hard disk read/write request in the target environment further comprises: notifying the hard disk read/write latency t to the CPU scheduler and notifying the virtual CPU scheduler to cause the suspended virtual CPU to resume its work;
wherein said determining a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time duration t1 and the hard disk read/write latency t comprises: setting the CPU processing time already consumed by the virtual CPU in the current CPU schedule period to t+t1.

### Claim 4 (depends on 1)

The method according to claim 1, wherein said in response to detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, predicting a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment comprises: recording a CPU time duration t2 already consumed by the virtual CPU in the current CPU schedule period; determining that the hard disk read/write request belongs to a hard disk read/write request that would not occur in the target environment, and predicting that, in the target environment, the hard disk read/write latency t corresponding to the hard disk read/write request is equal to 0;
wherein said notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time quota t1 and the hard disk read/write latency t comprises:
notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time durations t1, t2 already consumed by the virtual CPU in the CPU schedule period and the hard disk read/write latency t equal to 0.

### Claim 5 (depends on 4)

The method according to claim 4, wherein said notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time durations t1, t2 already consumed by the virtual CPU in the CPU schedule period and the hard disk read/write latency t equal to 0 comprises: notifying the virtual CPU scheduler to set the CPU processing time already consumed by the virtual CPU in the current CPU schedule period to t2.

### Claim 6 (depends on 2)

The method according to claim 2, wherein said in response to detecting completion of hard disk read/write processing corresponding to the hard disk read/write request, predicting a hard disk read/write latency t corresponding to the hard disk read/write request in a target environment comprises: recording a CPU time duration t2 already consumed by the virtual CPU in the current CPU schedule period; determining that the hard disk read/write request belongs to a hard disk read/write request that would occur in the target environment, and predicting the hard disk read/write latency t corresponding to the hard disk read/write request in the target environment based on the time when the hard disk read/write processing is completed;
wherein said notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time duration t1 already consumed by the virtual CPU in the CPU schedule period and the hard disk read/write latency t comprises: notifying the virtual CPU scheduler to determine a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time durations t1, t2 already consumed by the virtual CPU and the hard disk read/write latency t.

### Claim 7 (depends on 6)

The method according to claim 6, wherein said determining a CPU processing time already consumed by the virtual CPU in the current CPU schedule period based on the recorded CPU time durations t1, t2 already consumed by the virtual CPU and the hard disk read/write latency t comprises:
in response to t being less than or equal to (t2−t1), setting the CPU processing time already consumed by the virtual CPU in the current CPU schedule period to t2; and
in response to t being greater than (t2−t1), setting the CPU processing time already consumed by the virtual CPU in the current CPU schedule period to t1+t.

### Claim 8 (depends on 1)

The method according to claim 1, wherein said determining that the hard disk read/write request belongs to a hard disk read/write request that would not occur in the target environment is performed as follows: obtaining a memory access request of the virtual machine; determining that the memory access request needs a physical machine of the virtual machine to perform a hard disk read/write operation; in response to determining that the memory access request needs the hard disk read/write operation to be performed in the target environment, marking the hard disk read/write request triggered by the memory access request in the physical machine of the virtual machine.
