Re: [PHP-SOAP-DEV] some benchmarks.
Status: Alpha
Brought to you by:
rodif_bl
From: brad l. <rod...@ya...> - 2002-05-04 15:21:06
|
Hmm... The script that i can get to segfault if i put some other code (nothing to do with phpsoap) will stop segfaulting too. The thing im curious about is im not able to get the hello_world example to crash. try pulling down the current cvs. run the script again, the one that crashes, tail logs/error_log see if thers a segfault in there. - Brad --- Andrey Hristov <ahr...@ic...> wrote: > Maybe I've some good news for you. Last night I do some hacking on the test > scripts. > Testing with ab a simple hello_world_client+server.php gives me 377 errors - > probably all of those are because of the segfault. > I started to debug in th userspace to realize where it is crashing - and > what a surprise, after I started to debug the scripts do not crash. > Here I will post 2 pairs of sample scripts. The first one gives errors, the > second one not. To be almost completely sure I have done throughout test for > the latter pair for 1,500,000 reqs or 25200 secs(7hours) - it did 1,386,142 > requests. The difference between then is the server part of the pair. No > segfaulting scripts have just 2 lines more and these lines have nothing in > common with the SOAP extension. > hello_world_client.php + hello_world_server.php: > <?php > error_reporting(E_ALL); > echo microtime()."<br>\n"; > $hello = new SoapObject("http://192.168.1.140/hello_world_server.php", > "urn:HelloWord"); > echo microtime()."<br>\n"; > echo $hello->hello_soap("alala"); > echo microtime()."<br>\n"; > //var_dump($hello); > //var_dump(get_class_methods('SoapServer')); > ?> > hello_world_server.php > <?php > /* > $fname = 'tests/dbg'.str_replace(" ","_",microtime()).'.xml'; > $fd=fopen($fname,'w+'); > > ob_start(); > //var_dump($HTTP_RAW_POST_DATA); > //$a=ob_get_contents(); > ob_end_clean(); > > fputs($fd,$a."\n"); > fclose($fd); > */ > $server = new SoapServer("urn:HelloWord"); > /* > $fd=fopen($fname,'a+'); > fputs($fd,"after_server_create\n"); > fclose($fd); > */ > $server->addfunction("hello_soap"); > > //$fd=fopen($fname,'a'); > //fputs($fd,"after_addfunction\n"); > //fclose($fd); > > $server->handle(); > > function hello_soap($message){ > return "PHP-SOAP says ($message)"; > } > ?> > NOT SEGFAULTING pair: > <?php > error_reporting(E_ALL); > echo microtime()."<br>\n"; > $hello = new SoapObject("http://192.168.1.140/hello_world_server_noseg.php", > "urn:HelloWord"); > echo microtime()."<br>\n"; > echo $hello->hello_soap("alala"); > echo microtime()."<br>\n"; > //var_dump($hello); > //var_dump(get_class_methods('SoapServer')); > ?> > <?php > /* > $fname = 'tests/dbg'.str_replace(" ","_",microtime()).'.xml'; > $fd=fopen($fname,'w+'); > */ > ob_start(); > //var_dump($HTTP_RAW_POST_DATA); > //$a=ob_get_contents(); > ob_end_clean(); > /* > fputs($fd,$a."\n"); > fclose($fd); > */ > $server = new SoapServer("urn:HelloWord"); > /* > $fd=fopen($fname,'a+'); > fputs($fd,"after_server_create\n"); > fclose($fd); > */ > $server->addfunction("hello_soap"); > > //$fd=fopen($fname,'a'); > //fputs($fd,"after_addfunction\n"); > //fclose($fd); > > $server->handle(); > > function hello_soap($message){ > return "PHP-SOAP says ($message)"; > } > ?> > > Results from segfaulting pair: > Concurrency Level: 20 > Time taken for tests: 849.216 seconds > Complete requests: 50000 > Failed requests: 377 > (Connect: 0, Length: 377, Exceptions: 0) > Broken pipe errors: 0 > Total transferred: 16836709 bytes > HTML transferred: 4933615 bytes > Requests per second: 58.88 [#/sec] (mean) > Time per request: 339.69 [ms] (mean) > Time per request: 16.98 [ms] (mean, across all concurrent requests) > Transfer rate: 19.83 [Kbytes/sec] received > > Results from nonsegfaulting pair: > Concurrency Level: 20 > Time taken for tests: 25200.047 seconds > Complete requests: 1386142 > Failed requests: 0 > Broken pipe errors: 0 > Total transferred: 467135920 bytes > HTML transferred: 137229840 bytes > Requests per second: 55.01 [#/sec] (mean) > Time per request: 363.60 [ms] (mean) > Time per request: 18.18 [ms] (mean, across all concurrent requests) > Transfer rate: 18.54 [Kbytes/sec] received > > I hope that this will give some light what is going on. > > Have a nice day > > Andrey > > ----- Original Message ----- > From: "brad lafountain" <rod...@ya...> > To: "Andrey Hristov" <ahr...@ic...> > Sent: Friday, May 03, 2002 9:47 PM > Subject: Re: [PHP-SOAP-DEV] some benchmarks. > > > > Yeah i use malloc on purpose.. > > > > I use it for all of my wsdl stuff. My idea behind it is once a wsdl has > been > > parsed it can be kept around. Wsdl caching... its not in shared memory so > each > > demon will have to cache it. But it should work pretty good. even client > and > > server can share the same cached wsdl. Maybe someday i will make it use > shared > > memory. > > > > Let me know how the benchmarks go. > > > > Ill get that segfault eventually! > > > > - Brad > > > > --- Andrey Hristov <ahr...@ic...> wrote: > > > Brad, > > > > > > I've downloaded some other web stressing tools to do some other > benchmarks. > > > Unfortunately I cannot use MS Web Stress Tool because it runs only on NT > > > 4,5,6 but I've found some Open Source stuff on sourceforge. May be I'll > test > > > tonight and post the results after that or tommorow. I'm sorry but I > cannot > > > help you about this segfault. Few months ago I tried to write a php > > > extension and had segfaults on extension globals because I didn't knowed > > > that they are treated in special way. I had also segfault on when > working > > > with strings - not smart ones. > > > May I ask why you use malloc() instead of emalloc(). I've read int the > "Web > > > development with PHP4" and the same info available on php.net and > zend.com > > > that this kind of calls should not be performed. Look at the docs at > php.net > > > in the section of module writing. malloc() memory survive the after the > end > > > of script's life. Isn't here the problem. > > > > > > Andrey > > > > > > ----- Original Message ----- > > > From: "brad lafountain" <rod...@ya...> > > > To: "Andrey Hristov" <ahr...@ic...>; > > > <php...@li...> > > > Sent: Friday, May 03, 2002 6:24 PM > > > Subject: Re: [PHP-SOAP-DEV] some benchmarks. > > > > > > > > > > This sounds good :).. > > > > > > > > I did some benchmarks before too.. > > > > I did a > > > > > > > > <? > > > > echo "hello world"; > > > > ?> > === message truncated === __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |