Hello Again,
Before begining to describe my problem, a litle description of our dev platform:
VM Vcloud Director : 2 VCPU (2*2Ghz, reserve 4gHz), memory 4096MB reserve 2048MB)
VM Oracle for VCD : 2vCPU (2*2Ghz, reserve 3Ghz), memory 4096MB (reserve 2048MB)
VM Vcenter for VCD : 1VcPU(2Ghz, reserve 2Ghz), memory 4096MB (reserve 3072MB)
VM for our our application to test Vcloud API : (2vCPU (2*2Ghz, reserve 2GHz), memory 4096 (reserve 2048MB)
all vms work on esx server with 8 cpus with 32 Go of memory. and the vcenter used for our cloud infra managed 3 others esx with the same configuration.
our application works on debian lenny 64 bit with apache2 and PHP5.3.3
the connexion to the vcloud API is done via the vmware sdk PHP for the vcloud API.
the version is vcloudPHP-1.0.0-314767 and our vcd director cell is the 1.0.0-285979 build.
our application is connected directly on the vcloud api, there is no loadbalancer or proxy between them.
our application is accessing the vcloud api with the following configuration of the sdk :
$httpConfig = array('proxy_host'=>null,
'proxy_port'=>null,
'proxy_user'=>null,
'proxy_password'=>null,
'ssl_verify_peer'=>false,
'ssl_verify_host'=>false,
'ssl_cafile' =>null
);
to test the response time of our vcloud cell ,we used the following small php script which was executed in command line.
<?php
set_include_path(
implode(
PATH_SEPARATOR,
array(
'.:../../lib/library:../../lib/debug:../lib/intl',
get_include_path(),
)
)
);
require_once '../../config.php' ;
require_once 'VMware/VCloud/Service.php' ;
$auth = array (
'username'=> 'yconan@MyOrganization',
'password'=> 'mypassword'
) ;
$service = VMware_VCloud_SDK_Service::getService() ;
try {
$result = $service->login($server, $auth, $httpConfig) ;
}
catch (Exception $e) {
$message = $e->getMessage() ;
}
// to get a vappTemplate
$vappRef = "https://10.170.232.44/api/v1.0/vAppTemplate/vappTemplate-566935887" ;
$xml = $service->get($vappRef, $type='application/octet-stream', false);
$vapp = parseString($xml,null);
?>
the user used, has a vappuser Role.
and that is the result from xdebug after executing the script.
Some part of the result has been deleted(for example all part which take less than 0.09 ms). And I show the result with (+) characters to reproduce the functions calls tree displayed on kcachegrind.
response time :
1538.0 ms Cumulative time
899.0 ms VMware_VCloud_SDK_Service->login
601.0 ms + VMware_VCloud_SDK_Service->retriveLoginUrl
551.0 ms + + VMware_VCloud_SDK_Http_Client->get
540.0 ms + + + HTTP_Request2_Adapter_Socket->sendrequest
512.0 ms + + + + HTTP_Request2_Adapter_Socket->readResponse
500.0 ms + + + + + HTTP_Request2_Adapter_Socket->readLine
500.0 ms + + + + + + php::fgets
006.3 ms + + + + + HTTP_Request2_Adapter_Socket->fread
025.0 ms + + + + HTTP_Request2_Adapter_Socket->connect
009.0 ms + + + HTTP_Request2->setAdapter
050.0 ms + + getObjByXml
298.0 ms + VMware_VCloud_SDK_Service->post
286.0 ms + + + + + + php::fgets
341.0 ms VMWARE_VCloud_SDK_Service_Abstract->get
341.0 ms + VMware_Vcloud_SDK_Http_Client->get
333.0 ms + + + + + + php::fgets
267.0 ms require_once::/home/yconan/e2cdelta/trunk/lib/library/VMware/VCloud/Service.php
029.0 ms parseString
000.7 ms VMWARE_VCloud_SDK_Service::getService
000.2 ms require_once::/home/yconan/e2cdelta/trunk/config.php
<0.09 ms php::get_include_path
<0.09 ms php::implode
<0.09 ms php::set_include_path
You can see that the login takes 899 ms and in that there are 2 fgets which take 500.ms and 286 ms, hence 786/899 ms.
you can see also that the vapp's get takes 341 ms and in that there is a fgets which takes 333 ms.
all our results are the same when we use our application. And if we want to have a quick description of the vapps of one catalog, it can take many time if you have more than one vapp in your catalog.
all big object are concerned (vapp, vappTemplate, vdc, catalogs)
Do you have an idea where to look for to improve the speed of these request ?
Regards,
Yann CONAN