• UID63
  • Fans24
  • Follows1
  • Posts186

How to Test Cloud Server-part 2

More Posted time:Dec 11, 2015 16:50 PM
How to Test Cloud Server-Part 2

by Mr. Tian Jiu, from AliCloud

view part 1 of this article, pls click: How to Test Cloud Server-Part I

5  5-Minute Course for Perfkit for AliCloud

5.1  Environment Preparation

5.1.1   Preparing an AliCloud Account:

5.1.2   Installing Python 2.7 and pip on the Testing Server
a)  Installing Python 2.7 and pip
If you are running on Windows, get the latest version of Python 2.7 here. This should have pip bundled with it. Make sure your PATH environment variable is set so that you can use both python and pip on the command line (you can have the installer do it for you if you select the correct option).
Most Linux distributions and recent Mac OS X version already have Python 2.7 installed. If Python is not installed, you can likely install
it using your distribution's package manager, or see the
Python Download page. If you need to install pip, see these instructions.

b)   Installing python development tools:
   Debian or Ubuntu:
         $ sudo apt-get install -y python-dev
          $ sudo yum install python-devel

5.1.3   Installing aliyuncli Tools and ECS python sdk
    Install aliyuncli:
          $ sudo pip install aliyuncli
    Install python ecs SDK:
          $ sudo pip install aliyun-python-sdk-ecs
    Check whether the tool is successfully installed:
          $ aliyuncli ecs help
    If there is a usage prompt but no esc help, you need to run:
         $sudo cp -r/usr/local/lib/python2.7/dist-packages/aliyun*/usr/lib/python2.7/dist-packages/

5.1.4   Configuring Aliyuncli Authentication
You can create a new Access Key or use an existing Access Key for authentication of aliyuncli.  The detailed steps are as follows:

>  Sign in with your AliCloud account.
>  Click "AccessKeys" in the upper right corner.
>  If you haven't created any Accesskeys, please click "Create Access Key", copy "Access Key ID" and "Access Key Secret" and store them at a safe place. If you already have AccessKeys, just copy it.
>  Use the Access Key ID and Access Key Secret for configuration:
     $ aliyuncli configure

5.1.5   Downloading PerfkitBenchmarker Source Code
Github address:
$ git clone

5.2  Starting the Testing
> First, you need to know the testing environment. Please visit the official AliCloud Website, and click [Management Console]->[ECS]->[Create Instance]->[Pay As You Go], as shown in the following figure:

To query the region, run the command: aliyuncli ecs DescribeRegions. Jot down your [RegionId].
To query the zone, run the command:aliyuncli ecs DescribeZones --RegionId [RegionId]
Jot down your ZoneId.

>  For example, to test the network by using ping and mesh_network, and test I/O performance of SSD cloud disk by using fio, run the following command:
$ ./
--cloud=AliCloud --benchmarks=ping,mesh_network,fio --zone=us-west-1b
--ali_user_name=ubuntu --machine_type=ecs.s2.large --ali_io_optimized=optimized
--ali_system_disk_type=cloud_efficiency --scratch_disk_type=remote_ssd
$ ./
--cloud=AliCloud --benchmarks=ping,mesh_network,fio --zone=us-west-1b
--ali_io_optimized=optimized --ali_system_disk_type=cloud_efficiency

> To get help, run the following command:
$ ./ --help

Important Tips:

> ali_user_name (default ubuntu)
     The root account is not recommended as some benchmark tools require additional settings for the root account.
> ali_system_disk_type:
    General cloud disk (default):cloud
    Efficient cloud disk:cloud_efficiency
    SSD cloud disk:cloud_ssd
    Local SSD:ephemeral_ssd
>  scratch_disk_type:
    General cloud disk (default):standard
    SSD cloud disk:remote_ssd
    Efficient cloud disk:piops
    local SSD:  ephemeral_ssd
5.3   FAQs
In case of any problem, you can check ERROR information in the log. The following lists some common problems:

5.3.1   Problems related to aliyuncli
For details, go to Documentation Center aliyuncli.

5.3.2   Failed to apply for an instance
Cause 1: Incorrect parameter setting:
The console will display the help information
Cause 2: Instances are insufficient, purchase in the region is limited, or the inventory is not open to api.
    "Message": "The specified
region is in resource control, please try later.",
Cause 3: The instance cannot be created:
    "Message": "The resource is
out of usage.",
    "HostId": "",

5.3.3   Failed to apply for a VPC
Cause 1: Insufficient vpc quota
    "Message": "VPC quota
Please ensure that there is at least one available VPC quota.
Cause 2: VPCs are not supported in the zone.
ERROR   Got exception running Create: 'VpcId'
Set --ali_use_vpc=False

5.3.4   Insufficient account balance
Please chec your account balance
[Cloudy edited the post at Dec 15, 2015 14:28 PM]