Invention content
In view of the deficiencies of the prior art, it the present invention provides a kind of test method and device of cloud desktop performance, solves
The problem of test result is not allowed.
In order to achieve the above object, the present invention is achieved by the following technical programs:
According to a first aspect of the present invention, a kind of test method of cloud desktop performance is provided, including:
In a virtual machine run automatized script simulation client's scene, recording responses user's operation expend first when
Between and the corresponding user's operation first performance parameter;
Automatized script simulation client's scene is run in N number of virtual machine, records at least one virtual machine and responds user
It operates the second time expended and the second performance parameter of user's operation is corresponded in multiple virtual machines;
When second time being more than the first time, joined according to the first performance parameter and second performance
The numerical value of several correspondence adjustment N so that it is little that the second time that user's operation expends is responded in N number of virtual machine after adjustment
In the first time.
Further, the first performance parameter includes at least one of:
Server CPU parameters, memory parameters, network bandwidth occupy parameter, disk read-write speed parameter, client network stream
Amount;
Second performance parameter includes at least one of:
Server CPU parameters, memory parameters, network bandwidth occupy parameter, disk read-write speed parameter, client network stream
Amount.
Further, the first time and the primary of the corresponding user's operation that the recording responses user's operation expends
Energy parameter, including:
Multiple user's operations at least one virtual machine are recorded, server resource will be occupied in multiple user's operations than great
User's operation as typical operation;
The first time typical operation that typical operation described in recording responses expends occupies the first performance ginseng of server
Number.
Further, it is described that automatized script simulation client's scene is run in N number of virtual machine, it records at least one virtual
It is responded in machine in the second time and multiple virtual machines that user's operation expends and correspond to second performance parameter of user's operation, wrapped
It includes:
At least one virtual machine is chosen in N number of virtual machine, records respond that user's operation expends in the virtual machine the
Two times;
Record the second performance parameter that the identical user's operation in multiple virtual machines occupies server.
Further, it further includes:
The service of multiple virtual machines is determined according to the correspondence of the first performance parameter and second performance parameter
Device is configured.
According to a first aspect of the present invention, a kind of performance testing device of cloud desktop is provided, which is characterized in that including:
Acquisition module, for running automatized script simulation client's scene, recording responses user behaviour in a virtual machine
Make the first performance parameter of the first time expended and the corresponding user's operation;
Logging modle for running automatized script simulation client's scene in N number of virtual machine, records at least one virtual
It is responded in machine in the second time and multiple virtual machines that user's operation expends and corresponds to the second performance parameter of user's operation;
Adjust module, for when second time being more than the first time, according to the first performance parameter and
The numerical value of the correspondence adjustment N of second performance parameter so that user's operation is responded in N number of virtual machine after adjustment and is expended
The second time be not more than the first time.
Further, the first performance parameter includes at least one of:
Server CPU parameters, memory parameters, network bandwidth occupy parameter, disk read-write speed parameter, client network stream
Amount;
Second performance parameter includes at least one of:
Server CPU parameters, memory parameters, network bandwidth occupy parameter, disk read-write speed parameter, client network stream
Amount.
Further, the acquisition module includes:
First acquisition subelement, will be in multiple user's operations for recording multiple user's operations at least one virtual machine
The heavy user's operation of server resource is occupied as typical operation;
Second acquisition subelement occupies for the first time typical operation that typical operation described in recording responses expends
The first performance parameter of server.
Further, the logging modle includes:
First record subelement, for choosing at least one virtual machine in N number of virtual machine, records in the virtual machine and rings
The second time that user's operation is answered to expend;
Second record subelement, the identical user's operation for recording in multiple virtual machines occupy the secondary of server
It can parameter.
Further, configuration module is further included;
The configuration module, for being determined according to the correspondence of the first performance parameter and second performance parameter
The server configuration of multiple virtual machines.
An embodiment of the present invention provides a kind of test methods and device of cloud desktop performance.Has following advantageous effect:
On the basis of the time expended by user's operation according to response, the configuration number of virtual machine is adjusted, it is ensured that use
Family usage experience makes test more authentic and valid.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of the test method of cloud desktop performance shown in an embodiment in the present invention.As shown in Figure 1,
The test method of the cloud desktop performance includes the following steps:
In a step 101, automatized script simulation client's scene, recording responses user's operation are run in a virtual machine
The first time of consuming and the first performance parameter of the corresponding user's operation.
In this step, automatic imitation user can be first performed in a virtual machine (without other virtual machines in server)
The script of scape, the first time and the first of the corresponding operation that a certain operation of meeting recording responses user expends in script operation
Then performance parameter returns to the first time and first performance parameter.Specifically, it can record more at least one virtual machine
A user's operation will occupy the heavy user's operation of server resource as typical operation, typical case behaviour in multiple user's operations
Work can be the opening of webpage, the opening of document, the startup of video software etc..It is general choose 3 to 5 typical operations (
Can quantity be adjusted according to different business scene), the first time and the typical case that then typical operation described in recording responses expends
Operation occupies the first performance parameter of server.Wherein, be at the first time each user's operation by the response time, according to this
The duration comparison of response time may determine that user experience (operation whether smoothness etc.);The first performance parameter includes server
CPU parameters, memory parameters, network bandwidth occupy parameter, disk read-write speed parameter, one or more in client network flow
A combination.
For example, user opens the operation of browser, automatized script can record user's opening browser and loaded to the page
Into the time, returned the time as the first time.Because the user's operation response reality of cloud desktop is all by servicing
Device provides, so any operation at cloud desktop client end is all directly to the CPU of server, memory, network bandwidth occupies, disk is read
Writing rate has an impact;When virtual machine number is configured, above-mentioned each parameter configuration virtual machine is can refer to, to ensure the use of user
Experience.Thus, automatized script can also acquire and return to server, the performance data of client cloud desktop, including but not limited to:
Server cpu caused by client network flow, cloud desktop items are corresponded to using operation, memory, network bandwidth, disk read-write speed
Spend the occupancy situation of (disk io).
The first time and first performance parameter can be used as with reference to numerical value, for being used during virtual machine configuration.
In a step 102, automatized script simulation client's scene is run in N number of virtual machine, is recorded at least one virtual
It is responded in machine in the second time and multiple virtual machines that user's operation expends and corresponds to the second performance parameter of user's operation.
In this step, can deduce server to each parameter acquired in single virtual machine based on above-mentioned steps can hold
The maximum virtual machine quantity N of load.To ensure the usage experience of the user in each virtual machine in N number of virtual machine, it need to sentence and obtain N
Second time of server response and a variety of allusion quotations when the typical operation of a variety of typical operations and multiple combinations is performed in a virtual machine
Type operation occupies the second performance parameter of server, then according to second time and the second performance parameter configuration virtual machine
Number.
It may comprise steps of:
At least one virtual machine is chosen in N number of virtual machine, records respond that user's operation expends in the virtual machine the
Two times.For example, one virtual machine of random irregular selection, record use the user experience of the virtual machine, i.e., each is typical
The response time of operation, to judge whether operation is smooth.When the second time being more than (normal response time) at the first time, then say
Bright have a delay, delay may it is related with network bandwidth, be also possible to and other server performance relating to parameters.It can certainly select
Multiple virtual machines are taken, such as M virtual machine of selection, 1<M>4.The disclosure does not limit this quantity.
Record the second performance parameter that the identical user's operation in multiple virtual machines occupies server.
Second performance parameter can be server CPU parameters, memory parameters, network bandwidth occupies parameter, disk is read
The combination of one or more of writing rate parameter, client network flow.The second performance parameter can be in some embodiments
The average value of multiple virtual machine parameters.It, can be typical by the combination of typical operation, adjustment when determining second performance parameter
Interval, each group using modes such as different concurrent operations quantity, analysis single user scene, multifunctional combined family scenes are operated with,
It is calculated under different user scene, user's operation behavior influences variation tendency to server.
In step 103, when second time being more than the first time, according to the first performance parameter and institute
State the numerical value of the correspondence adjustment N of the second performance parameter so that respond what user's operation expended in N number of virtual machine after adjustment
Second time was not more than the first time.
It can be seen from the above, due to being run in single virtual machine at the first time, represent user and use operation smoothly
Standard.And the second time was then multiple virtual machines occupies time of the response user's operation after each performance parameter of server jointly,
The time if more than then illustrating that user's operation is likely to occur interim card etc. and has some setbacks operation at the first time.Therefore it can be based at the first time
Size with the second time is to determine whether need to adjust virtual machine number, to ensure, user's operation is smooth in each virtual machine.
In this step, the corresponding of the two can be calculated according to the first performance parameter and second performance parameter to close
System.For example, user watches video and network is influenced, and is occupied if a user watches video bandwidth as 5Mb/s (first performances
Parameter), two user occupancies are 10Mb/s seconds or so (the second performance parameter), and 10 users are 50Mb/s (the second performance parameter),
The first performance parameter and second performance parameter are linear;To clothes when can also obtain each user video simultaneously
Business device bandwidth occupancy is independent from each other, and the number of users and server bandwidth of virtual machine broadcasting video are linear.It is adjusting
During whole virtual machine quantity, can according to user's operation on a virtual machine (including various combinations) corresponding first performance parameter in N
Corresponding second performance parameter of same user's operation is N times of first performance parameter in a virtual machine, thus can be based on the two
The performance parameter of linear relationship adjustment virtual machine is calculated according to the configuration of each virtual machine suitable with meeting user demand
Virtual machine quantity.
Likewise, it can also show that different user operates corresponding server disk read-write, CPU is accounted for reference to above-mentioned example
With operating the changing rule of response time.For example, when multiple virtual machines perform some operation, perform response speed with it is virtual
The increase of machine number is linear, then the response speed that can record multiple virtual machines obtains the Time Change of operation response.
Then adjusting virtual machine number, operation is smooth to wait user demands so that response speed meets.
When multiple virtual machine different users carry out different operation, then the difference is calculated based on different user operative combination
Server performance parameter occupied by user's operation combination judges to occupy server according to the probability of happening of different user operative combination
The maximum value of performance parameter is then based on configuration and quantity that this adjusts each virtual machine.
The disclosure further includes step 104;
At step 104, it is determined according to the correspondence of the first performance parameter and second performance parameter multiple
The server configuration of virtual machine.
It i.e. in the above-described embodiments, can be described when adjusting virtual machine quantity according to the relationship of first time and the second time
The correspondence of first performance parameter and second performance parameter calculates situation (the same number of users of designated virtual machine quantity respectively
Amount) under each configuration for needing.For example, the broadcasting run in a virtual machine, each user network bandwidth needs 5Mb/s,
Assuming that actually there is 30 users to watch video, then 30 users just need bandwidth 30*5=150Mb/s, by matching to each virtual machine
Index calculating is put, the optimal service device configuration of virtual machine can be gone out with Approximate Calculation, and various different fields can be speculated according to scheme
Scape needs server configuring condition.
In conclusion the present invention obtains user's operation scene pair by being pressurizeed to cloud desktop and combining user experience
The influence variation of server on the basis of the time that user's operation expends according to response, adjusts the configuration number of virtual machine, Ke Yibao
User experience is demonstrate,proved, makes test more authentic and valid.It in the above-described embodiments, also can speculative arbitration according to virtual machine configuration
Go out the usage experience of user.
As shown in figure 3, the present invention also provides a kind of performance testing device of the cloud desktop of the corresponding above method, including:
Acquisition module 31, for running automatized script simulation client's scene, recording responses user in a virtual machine
Operate the first performance parameter of the first time expended and the corresponding user's operation;
Logging modle 32 for running automatized script simulation client's scene in N number of virtual machine, records at least one void
It is responded in plan machine in the second time and multiple virtual machines that user's operation expends and corresponds to the second performance parameter of user's operation;
Adjust module 44, for when second time be more than the first time when, according to the first performance parameter
With the numerical value of the correspondence adjustment N of second performance parameter so that respond user's operation consumption in N number of virtual machine after adjustment
The second time taken is not more than the first time.
As shown in figure 4, the test device of shown cloud desktop performance further includes configuration module 34;
The configuration module 34, it is true for the correspondence according to the first performance parameter and second performance parameter
The server configuration of fixed multiple virtual machines.
Further, the first performance parameter include server CPU parameters, memory parameters, network bandwidth occupy parameter,
The combination of one or more of disk read-write speed parameter, client network flow.
Second performance parameter includes server CPU parameters, memory parameters, network bandwidth and occupies parameter, disk read-write
The combination of one or more of speed parameter, client network flow.
Further, the acquisition module 31 includes:
First acquisition subelement, will be in multiple user's operations for recording multiple user's operations at least one virtual machine
The heavy user's operation of server resource is occupied as typical operation;
Second acquisition subelement occupies for the first time typical operation that typical operation described in recording responses expends
The first performance parameter of server.
Further, the logging modle 32 includes:
First record subelement, for choosing at least one virtual machine in N number of virtual machine, records in the virtual machine and rings
The second time that user's operation is answered to expend;
Second record subelement, the identical user's operation for recording in multiple virtual machines occupy the secondary of server
It can parameter.
The realization process of modules, the function of unit and effect specifically refers to corresponding step in the above method in above device
Rapid realization process, details are not described herein.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those
Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
Also there are other identical elements in process, method, article or equipment including the element.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
The present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each implementation
Technical solution recorded in example modifies or carries out equivalent replacement to which part technical characteristic;And these modification or
It replaces, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.