You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by David Klassen <db...@shaw.ca> on 2007/10/11 01:28:42 UTC

Memory Issues in Sample Server Code

I have been stress testing axis2c for performance (using the echo sample service), to determine if this platform is a good solution for my purposes. So far I have been attempting to debug each echo.exe invocation. Each time I execute the remote client invocation, the server process increments its used memory by 4 KB. When the service thread completes this memory is not deallocated. During the debug session I notice that:

  echo_invoke

is the only DLL function called. The other echo_skeleton.c memory management functions are not called:

  echo_free
  axis2_remove_instance

Can anyone suggest how I might configure axis2c to free memory for each echo service invocation (ie. per request)? 


Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
I decided to see how IIS handles this issue. Apparently IIS will absorb 570 MB of memory without complaining (using gnuthilla). Here is the updated memory usage (per/echo service invocation):

    Server                        |  v1.1.0 client   |   v1.0.0 client
    -------------------------------------------------------
    inetinfo.exe                 |   44K loss      |   28K loss
    httpd.exe                    |   24K loss      |   16K loss
    axis2_http_server.exe |     8K loss      |     4K loss

Once again if anyone knows a way to configure axis2c to prevent the memory leakage (ie. service or configuration settings), it would be really helpful. I continue to look at the documentation, and find no recourse. I will attempt some more debug sessions shortly.

----- Original Message -----
From: David Klassen <db...@shaw.ca>
Date: Thursday, October 11, 2007 3:11 pm
Subject: Re: Memory Issues in Sample Server Code
To: Apache AXIS C User List <ax...@ws.apache.org>

> Right this is what I have already done, using gnuthilla and 
> without gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 
> or v1.0.0 causes the size of  httpd.exe to grow continually. I 
> decided to post bug  AXIS2C-717 detailing where the memory of 
> httpd.exe kept growing and eventually encountered an unhandled 
> exception. 
> 
> ----- Original Message -----
> From: Dumindu Pallewela <du...@wso2.com>
> Date: Thursday, October 11, 2007 2:27 pm
> Subject: Re: Memory Issues in Sample Server Code
> To: Apache AXIS C User List <ax...@ws.apache.org>
> 
> > Hi David,
> > 
> > As we use apr pools for memory management in mod_axis2, the loss
> > that you see (when deployed in apache2) is most _likely_ not a bug.
> > Rather, it should be because that is how apr pools work. They 
> do not
> > necessarily free up memory immediately after a pool is destroyed.
> > 
> > The best way to test the apache module (If this isn't what you
> > already did!), is to run the client repeatedly and check if the
> > memory grows significantly.
> > 
> > HTH,
> > -Dumindu.
> > 
> > David Klassen wrote:
> > > Actually I was using both apache and the axis2_http_server, 
> of 
> > which the axis2_http_server had less memory absorption. 
> > Incidentally I also found a difference in the amount of memory 
> > loss due to version of the axis2c client program used. All 
> tests 
> > were performed using a v1.1.0 based server on Windows. The 
> > client programs were invoked on Linux using both v1.0.0 and 
> > v1.1.0 of axis2c:
> > > 
> > > 
> > Server                        |  v1.1.0 client   |   v1.0.0 client
> > > -------------------------------------------------------
> > > 
> > httpd.exe                    |   24K loss      |   16K loss
> > > axis2_http_server.exe |     8K 
> > loss      |     4K loss
> > > 
> > > I then decide to try using a Windows client against a Linux 
> > server. The windows client only used version 1.1.0.  I only 
> > used the Linux axis2_http_server for the server but alternated 
> > between v1.1.0 and v1.0.0. Here are the results:
> > > 
> > > 
> > > 
> > > 
> > Server                             |   v1.1.0 Window Client
> > > 
> > > -------------------------------------------------------
> > > 
> > > axis2_http_server v1.1.0  
> > |         4K loss
> > > 
> > > axis2_http_server v1.0.0  
> > |         no loss 
> > > 
> > > I have already seen both version of the Windows server leak, 
> > however in these tests it shows that  v1.0.0 of the Linux 
> > server did not leak but v1.1.0 does leak. Unfortunately I need 
> > to use the Windows server version for my implementation, so 
> this 
> > does not help in my case. Do you know does axis C++ v1.6 have 
> > memory issues like this on Windows server side? I really need 
> a 
> > version that performs well on Windows.
> > > 
> > > 
> > > ----- Original Message -----
> > > From: Samisa Abeysinghe <sa...@wso2.com>
> > > Date: Wednesday, October 10, 2007 8:23 pm
> > > Subject: Re: Memory Issues in Sample Server Code
> > > To: Apache AXIS C User List <ax...@ws.apache.org>
> > > 
> > >> There is are memory issues with simple axis server. We got 
> to 
> > >> fix that. 
> > >> In the mean time, could you please try the same tests with 
> > httpd 
> > >> module?I hope that would yield better results.
> > >>
> > >> Samisa...
> > >>
> > >> David Klassen wrote:
> > >>> I have been stress testing axis2c for performance (using 
> the 
> > >> echo 
> > >>> sample service), to determine if this platform is a good 
> > >> solution for 
> > >>> my purposes. So far I have been attempting to debug each 
> > >> echo.exe 
> > >>> invocation. Each time I execute the remote client 
> > invocation, 
> > >> the 
> > >>> server process increments its used memory by 4 KB. When 
> the 
> > >> service 
> > >>> thread completes this memory is not deallocated. During 
> the 
> > >> debug 
> > >>> session I notice that:
> > >>>
> > >>>    echo_invoke
> > >>>
> > >>> is the only DLL function called. The other echo_skeleton.c 
> > >> memory 
> > >>> management functions are not called:
> > >>>
> > >>>    echo_free
> > >>>    axis2_remove_instance
> > >>>
> > >>> Can anyone suggest how I might configure axis2c to free 
> > memory 
> > >> for 
> > >>> each echo service invocation (ie. per request)?
> > >>
> > >> -- 
> > >> Samisa Abeysinghe : WSO2 WSF/PHP
> > >> "http://wso2.org/projects/wsf/php?WSO2 Web Services 
> > Framework%2FPHP - Open source PHP extention for providing and 
> > consuming Web services in PHP"
> > >>
> > >>
> > >> ------------------------------------------------------------
> --
> > ---
> > >> ----
> > >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > >>
> > >>
> > > 
> > 
> > 
> > -- 
> > Dumindu Pallewela
> > http://blog.dumindu.com
> > GPG ID: 0x9E131672
> > 
> > WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
> > 
> > 
> 

Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
Thanks, obviously since you are using Linux the results will be different. On Windows the pre-built version of apache v2.2.4 does seem to have these memory issues, since it uses a threaded MPM model. The only way to circumvent the issue that I have found is using the following options:

    MaxRequestsPerChild  600
    MaxMemFree 1000

However I do not really like this method because a new process is launched to serve the new requests. This means that the apache service might temporarily have difficulty serving requests (Aside from crashing periodically for concurrent requests). However I will now try to use the pre-forking MPM on Windows instead of the default threaded configuration:

    https://issues.apache.org/jira/browse/AXIS2C-717

----- Original Message -----
From: Dinesh Premalal <xy...@gmail.com>
Date: Tuesday, October 30, 2007 8:53 pm
Subject: Re: Memory Issues in Sample Server Code
To: axis-c-user@ws.apache.org

null

Re: Memory Issues in Sample Server Code

Posted by Dinesh Premalal <xy...@gmail.com>.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org

Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
Could you post your httpd.conf? I am running on apache/Windows and would like something tactile to compare my results against. Your configuration vs. mine may be very very different. I would just like to check the configuration differences... So far on Windows httpd.exe is not releasing any memory. I let it run all night long.

-Thanks

----- Original Message -----
From: Dinesh Premalal <xy...@gmail.com>
Date: Tuesday, October 30, 2007 2:24 am
Subject: Re: Memory Issues in Sample Server Code
To: axis-c-user@ws.apache.org

> Hi David,
> 
> David Klassen <db...@shaw.ca> writes:
> 
> > I am running my tests with v1.1 but on Windows with apache 
> 2.2.x (latest
> > September release). I tried various things. I did see one diff 
> where the free
> > statement was either lost during the correction of an 
> indentation or purposely
> > removed, however the free statement replacement did not solve 
> the issue. Seeing
> > how other JIRA issues seemed to be closed concerning similar 
> reports, I kind of
> > assumed that people were not focusing on server performance in 
> this project,
> > but embedded C client access.
> I just compiled Axis2/C 1.1 and run server with Apache2.2.6
> version.Tried to send 100,000 requests. I monitored memory
> consumptions of the httpd. For me it never reach 400MB resident or
> virtual memory. I also able to see the memory resetting thing, 
> when it
> comes to something around 250MB memory get reset.I attached my process
> list and client response. 
> 
> 
> thanks,
> Dinesh
> 
> 
> echo.xml
> ----------
> <soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-
> envelope"><soapenv:Headerxmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://localhost:9089/axis2/services/echo</wsa:To><wsa:Action>http://ws.apache.org/axis2/c/samples/echoString</wsa:Action><wsa:MessageID>0c69d0c6-86b6-1dc1-275c-001125b4e529</wsa:MessageID></soapenv:Header><soapenv:Body><ns1:echoString
> xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello
> World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope> 
> 
> 
> client command
> --------------
> ab -T "application/soap+xml; charset=UTF-8" -p echo.xml -n 
> 100000 -c 4 http://localhost:9090/axis2/services/echo
> 
> 
> 
> client response
> ---------------
> Completed 90000 requests
> Finished 100000 requests
> 
> 
> Server Software:        
> Apache/2.2.6Server 
> Hostname:        localhost
> Server 
> Port:            9090
> 
> Document 
> Path:          /axis2/services/echo
> Document Length:        672 bytes
> 
> Concurrency Level:      4
> Time taken for tests:   276.629621 seconds
> Complete requests:      100000
> Failed requests:        0
> Write 
> errors:           0
> Total transferred:      83302499 bytes
> Total 
> POSTed:           69302079
> HTML transferred:       67202016 bytes
> Requests per second:    361.49 [/sec] (mean)
> Time per request:       11.065 [s] 
> (mean)Time per request:       
> 2.766 [s] (mean, across all concurrent requests)
> Transfer 
> rate:          294.08 [bytes/sec] received
>                         244.65 kb/s sent
>                         538.73 kb/s total
> 
> Connection Times (ms)
>               min  mean[/-sd] median   max
> Connect:        
> 0    0   
> 1.3      0     243
> Processing:     0   10 
> 110.7      1    5995
> Waiting:        
> 0    8 101.0      
> 1    4267
> Total:          
> 0   10 110.7      
> 2    5995
> 
> Percentage of the requests served within a certain time (ms)
>   50%      2
>   66%      2
>   75%      2
>   80%      2
>   90%      3
>   95%      3
>   98%      8
>   99%    218
>  100%   5995 (longest request)
> 
> 
> 
> 
> process list
> ---------------
> 
> USER      PR  NI  VIRT  
> RES  SHR S %CPU %MEM    TIME+   
> UID   PID COMMAND
> daemon    16   0  299m  69m 
> 1772 D  0.0  6.9   0:06.14    
> 1 29959 ./httpd -k start
> daemon    16   0  237m  61m 
> 1772 D  0.0  6.0   0:04.89    
> 1 29957 ./httpd -k start
> daemon    15   0  119m  47m 
> 2260 S  0.0  4.7   0:02.39    
> 1 30151 ./httpd -k start
> daemon    15   0 91468  46m 2260 
> S  0.0  4.6   0:01.67    1 
> 30215 ./httpd -k start
> daemon    16   0  296m  46m 
> 1772 S  0.0  4.6   0:06.18    
> 1 29958 ./httpd -k start
> daemon    15   0 89352  46m 2260 
> S  0.0  4.6   0:01.80    1 
> 30205 ./httpd -k start
> daemon    15   0  301m  45m 
> 1612 S  0.0  4.5   0:06.17    
> 1 29956 ./httpd -k start
> daemon    15   0  133m  45m 
> 2260 S  0.0  4.5   0:02.74    
> 1 30110 ./httpd -k start
> daemon    15   0 74116  44m 2260 
> S  0.0  4.4   0:01.46    1 
> 30244 ./httpd -k start
> daemon    15   0  128m  44m 
> 2260 S  0.0  4.4   0:02.56    
> 1 30120 ./httpd -k start
> daemon    16   0  247m  40m 
> 1764 D  0.0  4.0   0:05.45    
> 1 30012 ./httpd -k start
> daemon    15   0 45464  34m 2260 
> S  0.0  3.4   0:00.82    1 
> 30364 ./httpd -k start
> daemon    16   0  180m  32m 
> 1764 D  0.0  3.2   0:03.99    
> 1 30013 ./httpd -k start
> daemon    16   0  160m  30m 
> 1764 D  0.0  3.0   0:03.61    
> 1 30014 ./httpd -k start
> daemon    16   0  184m  28m 
> 1652 D  0.0  2.9   0:04.04    
> 1 30019 ./httpd -k start
> dinesh    15   0 31024  15m 4972 
> S  0.0  1.5   0:19.63 1000  4763 emacs -
> f gnus
> root      15   0 99.8m 6600 
> 2044 S  0.0  0.6   0:18.99    
> 0  4333 /usr/bin/X11/X -dpi 100 -nolisten tcp
> d
> 
> 
> 
> 
> -----------------------------------------------------------------
> ----
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 
> 

Re: Memory Issues in Sample Server Code

Posted by Dinesh Premalal <xy...@gmail.com>.
Subra,
"Subra A Narayanan" <as...@gmail.com> writes:
> Dinesh/Samisa,
>
> I am using Apache 2.0.59 with axis 1.1. Do you think upgrading to apache 2.2
> might solve some of these issues? Are you guys aware of any memory management
> issues with apache 2.0?
I'm unable to give you a straight word, But It would be better if you
could give a shot. IRC I tried with Apache 2.0.59 sometime back and
got similar results. (similar as in, it reset after reached to some
value). 

If you intend to send large number of request , I think it is better
to use  

   ab - Apache HTTP server benchmarking tool


Dinesh

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Memory Issues in Sample Server Code

Posted by Subra A Narayanan <as...@gmail.com>.
Dinesh/Samisa,

I am using Apache 2.0.59 with axis 1.1. Do you think upgrading to
apache 2.2might solve some of these issues? Are you guys aware of any
memory
management issues with apache 2.0?

Samisa, a quick question for you. In you email, you mentioned that calling
free is not going to free up memory from the apache pool. Does that mean
that I dont have to call AXIS2_FREE for any memory that I explicitly
allocated using AXIS2_MALLOC? Then why do we need the free function? Please
clarify.

Thank you,
Subra



On 10/30/07, Dinesh Premalal <xy...@gmail.com> wrote:
>
> Hi David,
>
> David Klassen <db...@shaw.ca> writes:
>
> > I am running my tests with v1.1 but on Windows with apache 2.2.x (latest
> > September release). I tried various things. I did see one diff where the
> free
> > statement was either lost during the correction of an indentation or
> purposely
> > removed, however the free statement replacement did not solve the issue.
> Seeing
> > how other JIRA issues seemed to be closed concerning similar reports, I
> kind of
> > assumed that people were not focusing on server performance in this
> project,
> > but embedded C client access.
> I just compiled Axis2/C 1.1 and run server with Apache2.2.6
> version.Tried to send 100,000 requests. I monitored memory
> consumptions of the httpd. For me it never reach 400MB resident or
> virtual memory. I also able to see the memory resetting thing, when it
> comes to something around 250MB memory get reset.I attached my process
> list and client response.
>
>
> thanks,
> Dinesh
>
>
> echo.xml
> ----------
> <soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header
> xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>
> http://localhost:9089/axis2/services/echo</wsa:To><wsa:Action>
> http://ws.apache.org/axis2/c/samples/echoString
> </wsa:Action><wsa:MessageID>0c69d0c6-86b6-1dc1-275c-001125b4e529</wsa:MessageID></soapenv:Header><soapenv:Body><ns1:echoString
> xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello
> World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope>
>
>
> client command
> --------------
> ab -T "application/soap+xml; charset=UTF-8" -p echo.xml -n 100000 -c 4
> http://localhost:9090/axis2/services/echo
>
>
>
> client response
> ---------------
> Completed 90000 requests
> Finished 100000 requests
>
>
> Server Software:        Apache/2.2.6
> Server Hostname:        localhost
> Server Port:            9090
>
> Document Path:          /axis2/services/echo
> Document Length:        672 bytes
>
> Concurrency Level:      4
> Time taken for tests:   276.629621 seconds
> Complete requests:      100000
> Failed requests:        0
> Write errors:           0
> Total transferred:      83302499 bytes
> Total POSTed:           69302079
> HTML transferred:       67202016 bytes
> Requests per second:    361.49 [/sec] (mean)
> Time per request:       11.065 [s] (mean)
> Time per request:       2.766 [s] (mean, across all concurrent requests)
> Transfer rate:          294.08 [bytes/sec] received
>                         244.65 kb/s sent
>                         538.73 kb/s total
>
> Connection Times (ms)
>               min  mean[/-sd] median   max
> Connect:        0    0   1.3      0     243
> Processing:     0   10 110.7      1    5995
> Waiting:        0    8 101.0      1    4267
> Total:          0   10 110.7      2    5995
>
> Percentage of the requests served within a certain time (ms)
>   50%      2
>   66%      2
>   75%      2
>   80%      2
>   90%      3
>   95%      3
>   98%      8
>   99%    218
> 100%   5995 (longest request)
>
>
>
>
> process list
> ---------------
>
> USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   UID   PID COMMAND
> daemon    16   0  299m  69m 1772 D  0.0  6.9   0:06.14    1 29959 ./httpd
> -k start
> daemon    16   0  237m  61m 1772 D  0.0  6.0   0:04.89    1 29957 ./httpd
> -k start
> daemon    15   0  119m  47m 2260 S  0.0  4.7   0:02.39    1 30151 ./httpd
> -k start
> daemon    15   0 91468  46m 2260 S  0.0  4.6   0:01.67    1 30215 ./httpd
> -k start
> daemon    16   0  296m  46m 1772 S  0.0  4.6   0:06.18    1 29958 ./httpd
> -k start
> daemon    15   0 89352  46m 2260 S  0.0  4.6   0:01.80    1 30205 ./httpd
> -k start
> daemon    15   0  301m  45m 1612 S  0.0  4.5   0:06.17    1 29956 ./httpd
> -k start
> daemon    15   0  133m  45m 2260 S  0.0  4.5   0:02.74    1 30110 ./httpd
> -k start
> daemon    15   0 74116  44m 2260 S  0.0  4.4   0:01.46    1 30244 ./httpd
> -k start
> daemon    15   0  128m  44m 2260 S  0.0  4.4   0:02.56    1 30120 ./httpd
> -k start
> daemon    16   0  247m  40m 1764 D  0.0  4.0   0:05.45    1 30012 ./httpd
> -k start
> daemon    15   0 45464  34m 2260 S  0.0  3.4   0:00.82    1 30364 ./httpd
> -k start
> daemon    16   0  180m  32m 1764 D  0.0  3.2   0:03.99    1 30013 ./httpd
> -k start
> daemon    16   0  160m  30m 1764 D  0.0  3.0   0:03.61    1 30014 ./httpd
> -k start
> daemon    16   0  184m  28m 1652 D  0.0  2.9   0:04.04    1 30019 ./httpd
> -k start
> dinesh    15   0 31024  15m 4972 S  0.0  1.5   0:19.63 1000  4763 emacs -f
> gnus
> root      15   0 99.8m 6600 2044 S  0.0  0.6   0:18.99    0  4333
> /usr/bin/X11/X -dpi 100 -nolisten tcp
> d
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Re: Memory Issues in Sample Server Code

Posted by Dinesh Premalal <xy...@gmail.com>.
Hi David,

David Klassen <db...@shaw.ca> writes:

> I am running my tests with v1.1 but on Windows with apache 2.2.x (latest
> September release). I tried various things. I did see one diff where the free
> statement was either lost during the correction of an indentation or purposely
> removed, however the free statement replacement did not solve the issue. Seeing
> how other JIRA issues seemed to be closed concerning similar reports, I kind of
> assumed that people were not focusing on server performance in this project,
> but embedded C client access.
I just compiled Axis2/C 1.1 and run server with Apache2.2.6
version.Tried to send 100,000 requests. I monitored memory
consumptions of the httpd. For me it never reach 400MB resident or
virtual memory. I also able to see the memory resetting thing, when it
comes to something around 250MB memory get reset.I attached my process
list and client response. 


thanks,
Dinesh


echo.xml
----------
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header
xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://localhost:9089/axis2/services/echo</wsa:To><wsa:Action>http://ws.apache.org/axis2/c/samples/echoString</wsa:Action><wsa:MessageID>0c69d0c6-86b6-1dc1-275c-001125b4e529</wsa:MessageID></soapenv:Header><soapenv:Body><ns1:echoString
xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello
World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope> 


client command
--------------
ab -T "application/soap+xml; charset=UTF-8" -p echo.xml -n 100000 -c 4 http://localhost:9090/axis2/services/echo



client response
---------------
Completed 90000 requests
Finished 100000 requests


Server Software:        Apache/2.2.6
Server Hostname:        localhost
Server Port:            9090

Document Path:          /axis2/services/echo
Document Length:        672 bytes

Concurrency Level:      4
Time taken for tests:   276.629621 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      83302499 bytes
Total POSTed:           69302079
HTML transferred:       67202016 bytes
Requests per second:    361.49 [/sec] (mean)
Time per request:       11.065 [s] (mean)
Time per request:       2.766 [s] (mean, across all concurrent requests)
Transfer rate:          294.08 [bytes/sec] received
                        244.65 kb/s sent
                        538.73 kb/s total

Connection Times (ms)
              min  mean[/-sd] median   max
Connect:        0    0   1.3      0     243
Processing:     0   10 110.7      1    5995
Waiting:        0    8 101.0      1    4267
Total:          0   10 110.7      2    5995

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      2
  75%      2
  80%      2
  90%      3
  95%      3
  98%      8
  99%    218
 100%   5995 (longest request)




process list
---------------

USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   UID   PID COMMAND
daemon    16   0  299m  69m 1772 D  0.0  6.9   0:06.14    1 29959 ./httpd -k start
daemon    16   0  237m  61m 1772 D  0.0  6.0   0:04.89    1 29957 ./httpd -k start
daemon    15   0  119m  47m 2260 S  0.0  4.7   0:02.39    1 30151 ./httpd -k start
daemon    15   0 91468  46m 2260 S  0.0  4.6   0:01.67    1 30215 ./httpd -k start
daemon    16   0  296m  46m 1772 S  0.0  4.6   0:06.18    1 29958 ./httpd -k start
daemon    15   0 89352  46m 2260 S  0.0  4.6   0:01.80    1 30205 ./httpd -k start
daemon    15   0  301m  45m 1612 S  0.0  4.5   0:06.17    1 29956 ./httpd -k start
daemon    15   0  133m  45m 2260 S  0.0  4.5   0:02.74    1 30110 ./httpd -k start
daemon    15   0 74116  44m 2260 S  0.0  4.4   0:01.46    1 30244 ./httpd -k start
daemon    15   0  128m  44m 2260 S  0.0  4.4   0:02.56    1 30120 ./httpd -k start
daemon    16   0  247m  40m 1764 D  0.0  4.0   0:05.45    1 30012 ./httpd -k start
daemon    15   0 45464  34m 2260 S  0.0  3.4   0:00.82    1 30364 ./httpd -k start
daemon    16   0  180m  32m 1764 D  0.0  3.2   0:03.99    1 30013 ./httpd -k start
daemon    16   0  160m  30m 1764 D  0.0  3.0   0:03.61    1 30014 ./httpd -k start
daemon    16   0  184m  28m 1652 D  0.0  2.9   0:04.04    1 30019 ./httpd -k start
dinesh    15   0 31024  15m 4972 S  0.0  1.5   0:19.63 1000  4763 emacs -f gnus
root      15   0 99.8m 6600 2044 S  0.0  0.6   0:18.99    0  4333 /usr/bin/X11/X -dpi 100 -nolisten tcp
d




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
I am running my tests with v1.1 but on Windows with apache 2.2.x (latest September release). I tried various things. I did see one diff where the free statement was either lost during the correction of an indentation or purposely removed, however the free statement replacement did not solve the issue. Seeing how other JIRA issues seemed to be closed concerning similar reports, I kind of assumed that people were not focusing on server performance in this project, but embedded C client access. 







Unfortunately my project is looking for a C-like client and server deployment. I will probably start looking into the code in a few weeks, since I really would like to use a similar platform. I've told others I would not use Java for the project, and since I have already invested the time it would be a shame to be forced to use the Java version instead.







Good point their might be some garbage collection initializations routine etc. that need to be triggered in order for memory recycling to be turned on. Thanks for the attention. I will try to let you know more when I start working with this project again.







----- Original Message -----



From: Subra A Narayanan <as...@gmail.com>



Date: Monday, October 29, 2007 7:23 am



Subject: Re: Memory Issues in Sample Server Code



To: Apache AXIS C User List <ax...@ws.apache.org>, dbavedb@shaw.ca







> Hello David,



> 



> Were you able to run the test again after adding some of the free()



> statements back in? Did it improve the performance? I am seeing 



> a similar



> issue where the memory footprint of the apache process keeps 



> increasinguntil a point when the server becomes very 



> unresponsive and my client starts



> getting timeouts.



> 



> After a while the root apache process spawns some new processes 



> and the



> server starts responding again. But the earlier apache processes 



> never free



> up their memory. Their memory usage reaches about 60mb and kind 



> of stays



> there.



> 



> I am using Axis 1.1 with apache 2.0.59.



> 



> May be someone from the Apache team can shed some more light.



> 



> 



> Thanks,



> Subra



> 



> On 10/12/07, David Klassen <db...@shaw.ca> wrote:



> >



> > Thanks, I assumed that this memory would be automatically 



> free'd. I will



> > try again, stress testing then waiting for the memory to be 



> free'd, since I



> > did not  give the server a break in the action (Rather 



> just watched the



> > process memory move from 20 MB to 500MB without seeing any 



> memory relieved).



> > Over a  period of 30 minutes @ 25 requests/second.



> >



> > However I am very sure that a well designed server should not 



> reach a



> > 500MB process footprint. The functionality of Linux v1.1.0 



> single threaded



> > example server (axis2_http_server), seems to have changed so 



> as to not



> > de-allocate all the memory right away. I suspect that with all the



> > indentation changes and code replacements from the v1.0.0 



> release to 1.1.0release perhaps a _free() or _FREE() function 



> was accidentally removed in



> > the process. I have already spotted one questionable place, 



> when I scanned



> > the svn diff from v1.0.0 to v1.1.0. I will test my theory tomorrow,



> > attempting to read-add various free() functions where I cannot 



> justify> removal.



> >



> > ----- Original Message -----



> > From: Samisa Abeysinghe <sa...@wso2.com>



> > Date: Thursday, October 11, 2007 7:46 pm



> > Subject: Re: Memory Issues in Sample Server Code



> > To: Apache AXIS C User List <ax...@ws.apache.org>



> >



> > > David Klassen wrote:



> > > > Right this is what I have already done, using gnuthilla and



> > > without



> > > > gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or



> > > v1.0.0



> > > > causes the size of  httpd.exe to grow continually. I



> > > decided to post



> > > > bug  *AXIS2C-717



> > > <https://issues.apache.org/jira/browse/AXIS2C-717>*



> > > > detailing where the memory of httpd.exe kept growing and



> > > eventually



> > > > encountered an unhandled exception.



> > > Please note that, even though there seems to be a growith, if



> > > you keep



> > > on sending requests, you would notice that, at some point, it



> > > drops



> > > back. This is dues to the pooling behaviors of apache. I cannot



> > > recall



> > > an exact number, after which it would drop, possibly you 



> have to



> > > send



> > > few hundred requests.



> > >



> > > Samisa...



> > > >



> > > > ----- Original Message -----



> > > > From: Dumindu Pallewela <du...@wso2.com>



> > > > Date: Thursday, October 11, 2007 2:27 pm



> > > > Subject: Re: Memory Issues in Sample Server Code



> > > > To: Apache AXIS C User List <ax...@ws.apache.org>



> > > >



> > > > > Hi David,



> > > > >



> > > > > As we use apr pools for memory management in mod_axis2, 



> the loss



> > > > > that you see (when deployed in apache2) is most _likely_ not



> > > a bug.



> > > > > Rather, it should be because that is how apr pools work.



> > > They do not



> > > > > necessarily free up memory immediately after a pool is 



> destroyed.> > > >



> > > > > The best way to test the apache module (If this isn't 



> what you



> > > > > already did!), is to run the client repeatedly and check 



> if the



> > > > > memory grows significantly.



> > > > >



> > > > > HTH,



> > > > > -Dumindu.



> > > > >



> > > > > David Klassen wrote:



> > > > > > Actually I was using both apache and the



> > > axis2_http_server, of



> > > > > which the axis2_http_server had less memory absorption.



> > > > > Incidentally I also found a difference in the amount of memory



> > > > > loss due to version of the axis2c client program used. 



> All tests



> > > > > were performed using a v1.1.0 based server on Windows. The



> > > > > client programs were invoked on Linux using both v1.0.0 and



> > > > > v1.1.0 of axis2c:



> > > > > >



> > > > > >



> > > > >



> > > 



> Server                        |  v1.1.0 client   |   v1.0.0 client



> > > > > > -------------------------------------------------------



> > > > > >



> > > > >



> > > 



> httpd.exe                    |   24K loss      |   16K loss



> > > > > > axis2_http_server.exe |     8K



> > > > > loss      |



> > > 4K loss



> > > > > >



> > > > > > I then decide to try using a Windows client against a Linux



> > > > > server. The windows client only used version 



> 1.1.0.  I only



> > > > > used the Linux axis2_http_server for the server but alternated



> > > > > between v1.1.0 and v1.0.0. Here are the results:



> > > > > >



> > > > > >



> > > > > >



> > > > > >



> > > > >



> > > 



> Server                             |   v1.1.0 Window Client



> > > > > >



> > > > > > -------------------------------------------------------



> > > > > >



> > > > > > axis2_http_server v1.1.0



> > > > > |         4K loss



> > > > > >



> > > > > > axis2_http_server v1.0.0



> > > > > |         no loss



> > > > > >



> > > > > > I have already seen both version of the Windows server leak,



> > > > > however in these tests it shows that  v1.0.0 of the Linux



> > > > > server did not leak but v1.1.0 does leak. Unfortunately 



> I need



> > > > > to use the Windows server version for my implementation, 



> so this



> > > > > does not help in my case. Do you know does axis C++ v1.6 have



> > > > > memory issues like this on Windows server side? I really



> > > need a



> > > > > version that performs well on Windows.



> > > > > >



> > > > > >



> > > > > > ----- Original Message -----



> > > > > > From: Samisa Abeysinghe <sa...@wso2.com>



> > > > > > Date: Wednesday, October 10, 2007 8:23 pm



> > > > > > Subject: Re: Memory Issues in Sample Server Code



> > > > > > To: Apache AXIS C User List <ax...@ws.apache.org>



> > > > > >



> > > > > >> There is are memory issues with simple axis server. We



> > > got to



> > > > > >> fix that.



> > > > > >> In the mean time, could you please try the same tests with



> > > > > httpd



> > > > > >> module?I hope that would yield better results.



> > > > > >>



> > > > > >> Samisa...



> > > > > >>



> > > > > >> David Klassen wrote:



> > > > > >>> I have been stress testing axis2c for performance 



> (using the



> > > > > >> echo



> > > > > >>> sample service), to determine if this platform is a good



> > > > > >> solution for



> > > > > >>> my purposes. So far I have been attempting to debug each



> > > > > >> echo.exe



> > > > > >>> invocation. Each time I execute the remote client



> > > > > invocation,



> > > > > >> the



> > > > > >>> server process increments its used memory by 4 KB. 



> When the



> > > > > >> service



> > > > > >>> thread completes this memory is not deallocated. 



> During the



> > > > > >> debug



> > > > > >>> session I notice that:



> > > > > >>>



> > > > > >>>    echo_invoke



> > > > > >>>



> > > > > >>> is the only DLL function called. The other echo_skeleton.c



> > > > > >> memory



> > > > > >>> management functions are not called:



> > > > > >>>



> > > > > >>>    echo_free



> > > > > >>>    axis2_remove_instance



> > > > > >>>



> > > > > >>> Can anyone suggest how I might configure axis2c to free



> > > > > memory



> > > > > >> for



> > > > > >>> each echo service invocation (ie. per request)?



> > > > > >>



> > > > > >> --



> > > > > >> Samisa Abeysinghe : WSO2 WSF/PHP



> > > > > >> "http://wso2.org/projects/wsf/php?WSO2 Web Services



> > > > > Framework%2FPHP - Open source PHP extention for 



> providing and



> > > > > consuming Web services in PHP"



> > > > > >>



> > > > > >>



> > > > > >> ------------------------------------------------------



> ----



> > > ----



> > > > > ---



> > > > > >> ----



> > > > > >> To unsubscribe, e-mail: axis-c-user-



> unsubscribe@ws.apache.org> > > > >> For additional commands, e-



> mail: axis-c-user-help@ws.apache.org



> > > > > >>



> > > > > >>



> > > > > >



> > > > >



> > > > >



> > > > > --



> > > > > Dumindu Pallewela



> > > > > http://blog.dumindu.com



> > > > > GPG ID: 0x9E131672



> > > > >



> > > > > WSO2 | http://wso2.com | "Oxygenating the Web Service 



> Platform"> > > >



> > > > >



> > >



> > >



> > > --



> > > Samisa Abeysinghe : WSO2 WSF/PHP



> > > "http://wso2.org/projects/wsf/php?WSO2



> >  Web Services Framework%2FPHP - Open source PHP extention 



> for providing and consuming Web services in PHP"



> > >



> > >



> > > -------------------------------------------------------------



> ----



> > > ----



> > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org



> > > For additional commands, e-mail: axis-c-user-help@ws.apache.org



> > >



> > >



> >



> 

Re: Memory Issues in Sample Server Code

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Subra A Narayanan wrote:
> Hello David,
>
> Were you able to run the test again after adding some of the free() 
> statements back in? Did it improve the performance? I am seeing a 
> similar issue where the memory footprint of the apache process keeps 
> increasing until a point when the server becomes very unresponsive and 
> my client starts getting timeouts.
Please note that calling free would not have any impact as far as 
mod_axis2 is concerned. With Apache httpd, it controls the memory with 
pools and it decides when to release pool allocations. We do not have 
control on when memory would be release, so a call to free with 
mod_axis2 only means that we are done with it, but the server may keep 
that piece of memory.
>
> After a while the root apache process spawns some new processes and 
> the server starts responding again. But the earlier apache processes 
> never free up their memory. Their memory usage reaches about 60mb and 
> kind of stays there.
The way how and when new processes are spawned by apache could be fine 
tuned with httpd.conf settings.
These settings govern how apache responds to heavy load. Again, this is 
out of scope for Axis2 module but rather governed by Apache httpd 
configuration.  See 
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html for more information.

Samisa...
>
> I am using Axis 1.1 with apache 2.0.59.
>
> May be someone from the Apache team can shed some more light.
>
>
> Thanks,
> Subra
>
> On 10/12/07, * David Klassen* <dbavedb@shaw.ca 
> <ma...@shaw.ca>> wrote:
>
>     Thanks, I assumed that this memory would be automatically free'd.
>     I will try again, stress testing then waiting for the memory to be
>     free'd, since I  did not  give the server a break in the action
>     (Rather just watched the process memory move from 20 MB to 500MB
>     without seeing any memory relieved). Over a  period of 30 minutes
>     @ 25 requests/second.
>
>     However I am very sure that a well designed server should not
>     reach a 500MB process footprint. The functionality of Linux v1.1.0
>     single threaded example server (axis2_http_server), seems to have
>     changed so as to not de-allocate all the memory right away. I
>     suspect that with all the indentation changes and code
>     replacements from the v1.0.0 release to 1.1.0 release perhaps a
>     _free() or _FREE() function was accidentally removed in the
>     process. I have already spotted one questionable place, when I
>     scanned the svn diff from v1.0.0 to v1.1.0. I will test my theory
>     tomorrow, attempting to read-add various free() functions where I
>     cannot justify removal.
>
>     ----- Original Message -----
>     From: Samisa Abeysinghe <samisa@wso2.com <ma...@wso2.com>>
>     Date: Thursday, October 11, 2007 7:46 pm
>     Subject: Re: Memory Issues in Sample Server Code
>     To: Apache AXIS C User List < axis-c-user@ws.apache.org
>     <ma...@ws.apache.org>>
>
>     > David Klassen wrote:
>     > > Right this is what I have already done, using gnuthilla and
>     > without
>     > > gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or
>     > v1.0.0
>     > > causes the size of  httpd.exe to grow continually. I
>     > decided to post
>     > > bug  *AXIS2C-717
>     > < https://issues.apache.org/jira/browse/AXIS2C-717>*
>     > > detailing where the memory of httpd.exe kept growing and
>     > eventually
>     > > encountered an unhandled exception.
>     > Please note that, even though there seems to be a growith, if
>     > you keep
>     > on sending requests, you would notice that, at some point, it
>     > drops
>     > back. This is dues to the pooling behaviors of apache. I cannot
>     > recall
>     > an exact number, after which it would drop, possibly you have to
>     > send
>     > few hundred requests.
>     >
>     > Samisa...
>     > >
>     > > ----- Original Message -----
>     > > From: Dumindu Pallewela < dumindu@wso2.com
>     <ma...@wso2.com>>
>     > > Date: Thursday, October 11, 2007 2:27 pm
>     > > Subject: Re: Memory Issues in Sample Server Code
>     > > To: Apache AXIS C User List < axis-c-user@ws.apache.org
>     <ma...@ws.apache.org>>
>     > >
>     > > > Hi David,
>     > > >
>     > > > As we use apr pools for memory management in mod_axis2, the loss
>     > > > that you see (when deployed in apache2) is most _likely_ not
>     > a bug.
>     > > > Rather, it should be because that is how apr pools work.
>     > They do not
>     > > > necessarily free up memory immediately after a pool is destroyed.
>     > > >
>     > > > The best way to test the apache module (If this isn't what you
>     > > > already did!), is to run the client repeatedly and check if the
>     > > > memory grows significantly.
>     > > >
>     > > > HTH,
>     > > > -Dumindu.
>     > > >
>     > > > David Klassen wrote:
>     > > > > Actually I was using both apache and the
>     > axis2_http_server, of
>     > > > which the axis2_http_server had less memory absorption.
>     > > > Incidentally I also found a difference in the amount of memory
>     > > > loss due to version of the axis2c client program used. All tests
>     > > > were performed using a v1.1.0 based server on Windows. The
>     > > > client programs were invoked on Linux using both v1.0.0 and
>     > > > v1.1.0 of axis2c:
>     > > > >
>     > > > >
>     > > >
>     > Server                        |  v1.1.0 client   |   v1.0.0 client
>     > > > > -------------------------------------------------------
>     > > > >
>     > > >
>     > httpd.exe                    |   24K loss      |   16K loss
>     > > > > axis2_http_server.exe |     8K
>     > > > loss      |    
>     > 4K loss
>     > > > >
>     > > > > I then decide to try using a Windows client against a Linux
>     > > > server. The windows client only used version 1.1.0.  I only
>     > > > used the Linux axis2_http_server for the server but alternated
>     > > > between v1.1.0 and v1.0.0. Here are the results:
>     > > > >
>     > > > >
>     > > > >
>     > > > >
>     > > >
>     > Server                             |   v1.1.0 Window Client
>     > > > >
>     > > > > -------------------------------------------------------
>     > > > >
>     > > > > axis2_http_server v1.1.0
>     > > > |         4K loss
>     > > > >
>     > > > > axis2_http_server v1.0.0
>     > > > |         no loss
>     > > > >
>     > > > > I have already seen both version of the Windows server leak,
>     > > > however in these tests it shows that  v1.0.0 of the Linux
>     > > > server did not leak but v1.1.0 does leak. Unfortunately I need
>     > > > to use the Windows server version for my implementation, so this
>     > > > does not help in my case. Do you know does axis C++ v1.6 have
>     > > > memory issues like this on Windows server side? I really
>     > need a
>     > > > version that performs well on Windows.
>     > > > >
>     > > > >
>     > > > > ----- Original Message -----
>     > > > > From: Samisa Abeysinghe <samisa@wso2.com
>     <ma...@wso2.com>>
>     > > > > Date: Wednesday, October 10, 2007 8:23 pm
>     > > > > Subject: Re: Memory Issues in Sample Server Code
>     > > > > To: Apache AXIS C User List < axis-c-user@ws.apache.org
>     <ma...@ws.apache.org>>
>     > > > >
>     > > > >> There is are memory issues with simple axis server. We
>     > got to
>     > > > >> fix that.
>     > > > >> In the mean time, could you please try the same tests with
>     > > > httpd
>     > > > >> module?I hope that would yield better results.
>     > > > >>
>     > > > >> Samisa...
>     > > > >>
>     > > > >> David Klassen wrote:
>     > > > >>> I have been stress testing axis2c for performance (using the
>     > > > >> echo
>     > > > >>> sample service), to determine if this platform is a good
>     > > > >> solution for
>     > > > >>> my purposes. So far I have been attempting to debug each
>     > > > >> echo.exe
>     > > > >>> invocation. Each time I execute the remote client
>     > > > invocation,
>     > > > >> the
>     > > > >>> server process increments its used memory by 4 KB. When the
>     > > > >> service
>     > > > >>> thread completes this memory is not deallocated. During the
>     > > > >> debug
>     > > > >>> session I notice that:
>     > > > >>>
>     > > > >>>    echo_invoke
>     > > > >>>
>     > > > >>> is the only DLL function called. The other echo_skeleton.c
>     > > > >> memory
>     > > > >>> management functions are not called:
>     > > > >>>
>     > > > >>>    echo_free
>     > > > >>>    axis2_remove_instance
>     > > > >>>
>     > > > >>> Can anyone suggest how I might configure axis2c to free
>     > > > memory
>     > > > >> for
>     > > > >>> each echo service invocation (ie. per request)?
>     > > > >>
>     > > > >> --
>     > > > >> Samisa Abeysinghe : WSO2 WSF/PHP
>     > > > >> " http://wso2.org/projects/wsf/php?WSO2 Web Services
>     > > > Framework%2FPHP - Open source PHP extention for providing and
>     > > > consuming Web services in PHP"
>     > > > >>
>     > > > >>
>     > > > >> ----------------------------------------------------------
>     > ----
>     > > > ---
>     > > > >> ----
>     > > > >> To unsubscribe, e-mail:
>     axis-c-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     > > > >> For additional commands, e-mail:
>     axis-c-user-help@ws.apache.org <ma...@ws.apache.org>
>     > > > >>
>     > > > >>
>     > > > >
>     > > >
>     > > >
>     > > > --
>     > > > Dumindu Pallewela
>     > > > http://blog.dumindu.com
>     > > > GPG ID: 0x9E131672
>     > > >
>     > > > WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
>     > > >
>     > > >
>     >
>     >
>     > --
>     > Samisa Abeysinghe : WSO2 WSF/PHP
>     > "
>     http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
>
>
>     >
>     >
>     > -----------------------------------------------------------------
>     > ----
>     > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     > For additional commands, e-mail: axis-c-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >
>     >
>
>


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Memory Issues in Sample Server Code

Posted by Subra A Narayanan <as...@gmail.com>.
Hello David,

Were you able to run the test again after adding some of the free()
statements back in? Did it improve the performance? I am seeing a similar
issue where the memory footprint of the apache process keeps increasing
until a point when the server becomes very unresponsive and my client starts
getting timeouts.

After a while the root apache process spawns some new processes and the
server starts responding again. But the earlier apache processes never free
up their memory. Their memory usage reaches about 60mb and kind of stays
there.

I am using Axis 1.1 with apache 2.0.59.

May be someone from the Apache team can shed some more light.


Thanks,
Subra

On 10/12/07, David Klassen <db...@shaw.ca> wrote:
>
> Thanks, I assumed that this memory would be automatically free'd. I will
> try again, stress testing then waiting for the memory to be free'd, since I
> did not  give the server a break in the action (Rather just watched the
> process memory move from 20 MB to 500MB without seeing any memory relieved).
> Over a  period of 30 minutes @ 25 requests/second.
>
> However I am very sure that a well designed server should not reach a
> 500MB process footprint. The functionality of Linux v1.1.0 single threaded
> example server (axis2_http_server), seems to have changed so as to not
> de-allocate all the memory right away. I suspect that with all the
> indentation changes and code replacements from the v1.0.0 release to 1.1.0release perhaps a _free() or _FREE() function was accidentally removed in
> the process. I have already spotted one questionable place, when I scanned
> the svn diff from v1.0.0 to v1.1.0. I will test my theory tomorrow,
> attempting to read-add various free() functions where I cannot justify
> removal.
>
> ----- Original Message -----
> From: Samisa Abeysinghe <sa...@wso2.com>
> Date: Thursday, October 11, 2007 7:46 pm
> Subject: Re: Memory Issues in Sample Server Code
> To: Apache AXIS C User List <ax...@ws.apache.org>
>
> > David Klassen wrote:
> > > Right this is what I have already done, using gnuthilla and
> > without
> > > gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or
> > v1.0.0
> > > causes the size of  httpd.exe to grow continually. I
> > decided to post
> > > bug  *AXIS2C-717
> > <https://issues.apache.org/jira/browse/AXIS2C-717>*
> > > detailing where the memory of httpd.exe kept growing and
> > eventually
> > > encountered an unhandled exception.
> > Please note that, even though there seems to be a growith, if
> > you keep
> > on sending requests, you would notice that, at some point, it
> > drops
> > back. This is dues to the pooling behaviors of apache. I cannot
> > recall
> > an exact number, after which it would drop, possibly you have to
> > send
> > few hundred requests.
> >
> > Samisa...
> > >
> > > ----- Original Message -----
> > > From: Dumindu Pallewela <du...@wso2.com>
> > > Date: Thursday, October 11, 2007 2:27 pm
> > > Subject: Re: Memory Issues in Sample Server Code
> > > To: Apache AXIS C User List <ax...@ws.apache.org>
> > >
> > > > Hi David,
> > > >
> > > > As we use apr pools for memory management in mod_axis2, the loss
> > > > that you see (when deployed in apache2) is most _likely_ not
> > a bug.
> > > > Rather, it should be because that is how apr pools work.
> > They do not
> > > > necessarily free up memory immediately after a pool is destroyed.
> > > >
> > > > The best way to test the apache module (If this isn't what you
> > > > already did!), is to run the client repeatedly and check if the
> > > > memory grows significantly.
> > > >
> > > > HTH,
> > > > -Dumindu.
> > > >
> > > > David Klassen wrote:
> > > > > Actually I was using both apache and the
> > axis2_http_server, of
> > > > which the axis2_http_server had less memory absorption.
> > > > Incidentally I also found a difference in the amount of memory
> > > > loss due to version of the axis2c client program used. All tests
> > > > were performed using a v1.1.0 based server on Windows. The
> > > > client programs were invoked on Linux using both v1.0.0 and
> > > > v1.1.0 of axis2c:
> > > > >
> > > > >
> > > >
> > Server                        |  v1.1.0 client   |   v1.0.0 client
> > > > > -------------------------------------------------------
> > > > >
> > > >
> > httpd.exe                    |   24K loss      |   16K loss
> > > > > axis2_http_server.exe |     8K
> > > > loss      |
> > 4K loss
> > > > >
> > > > > I then decide to try using a Windows client against a Linux
> > > > server. The windows client only used version 1.1.0.  I only
> > > > used the Linux axis2_http_server for the server but alternated
> > > > between v1.1.0 and v1.0.0. Here are the results:
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > Server                             |   v1.1.0 Window Client
> > > > >
> > > > > -------------------------------------------------------
> > > > >
> > > > > axis2_http_server v1.1.0
> > > > |         4K loss
> > > > >
> > > > > axis2_http_server v1.0.0
> > > > |         no loss
> > > > >
> > > > > I have already seen both version of the Windows server leak,
> > > > however in these tests it shows that  v1.0.0 of the Linux
> > > > server did not leak but v1.1.0 does leak. Unfortunately I need
> > > > to use the Windows server version for my implementation, so this
> > > > does not help in my case. Do you know does axis C++ v1.6 have
> > > > memory issues like this on Windows server side? I really
> > need a
> > > > version that performs well on Windows.
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Samisa Abeysinghe <sa...@wso2.com>
> > > > > Date: Wednesday, October 10, 2007 8:23 pm
> > > > > Subject: Re: Memory Issues in Sample Server Code
> > > > > To: Apache AXIS C User List <ax...@ws.apache.org>
> > > > >
> > > > >> There is are memory issues with simple axis server. We
> > got to
> > > > >> fix that.
> > > > >> In the mean time, could you please try the same tests with
> > > > httpd
> > > > >> module?I hope that would yield better results.
> > > > >>
> > > > >> Samisa...
> > > > >>
> > > > >> David Klassen wrote:
> > > > >>> I have been stress testing axis2c for performance (using the
> > > > >> echo
> > > > >>> sample service), to determine if this platform is a good
> > > > >> solution for
> > > > >>> my purposes. So far I have been attempting to debug each
> > > > >> echo.exe
> > > > >>> invocation. Each time I execute the remote client
> > > > invocation,
> > > > >> the
> > > > >>> server process increments its used memory by 4 KB. When the
> > > > >> service
> > > > >>> thread completes this memory is not deallocated. During the
> > > > >> debug
> > > > >>> session I notice that:
> > > > >>>
> > > > >>>    echo_invoke
> > > > >>>
> > > > >>> is the only DLL function called. The other echo_skeleton.c
> > > > >> memory
> > > > >>> management functions are not called:
> > > > >>>
> > > > >>>    echo_free
> > > > >>>    axis2_remove_instance
> > > > >>>
> > > > >>> Can anyone suggest how I might configure axis2c to free
> > > > memory
> > > > >> for
> > > > >>> each echo service invocation (ie. per request)?
> > > > >>
> > > > >> --
> > > > >> Samisa Abeysinghe : WSO2 WSF/PHP
> > > > >> "http://wso2.org/projects/wsf/php?WSO2 Web Services
> > > > Framework%2FPHP - Open source PHP extention for providing and
> > > > consuming Web services in PHP"
> > > > >>
> > > > >>
> > > > >> ----------------------------------------------------------
> > ----
> > > > ---
> > > > >> ----
> > > > >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > > > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > > > >>
> > > > >>
> > > > >
> > > >
> > > >
> > > > --
> > > > Dumindu Pallewela
> > > > http://blog.dumindu.com
> > > > GPG ID: 0x9E131672
> > > >
> > > > WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
> > > >
> > > >
> >
> >
> > --
> > Samisa Abeysinghe : WSO2 WSF/PHP
> > "http://wso2.org/projects/wsf/php?WSO2
>  Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
> >
> >
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
>

Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
Thanks, I assumed that this memory would be automatically free'd. I will try again, stress testing then waiting for the memory to be free'd, since I  did not  give the server a break in the action (Rather just watched the process memory move from 20 MB to 500MB without seeing any memory relieved). Over a  period of 30 minutes @ 25 requests/second.

However I am very sure that a well designed server should not reach a 500MB process footprint. The functionality of Linux v1.1.0 single threaded example server (axis2_http_server), seems to have changed so as to not de-allocate all the memory right away. I suspect that with all the indentation changes and code replacements from the v1.0.0 release to 1.1.0 release perhaps a _free() or _FREE() function was accidentally removed in the process. I have already spotted one questionable place, when I scanned the svn diff from v1.0.0 to v1.1.0. I will test my theory tomorrow, attempting to read-add various free() functions where I cannot justify removal.

----- Original Message -----
From: Samisa Abeysinghe <sa...@wso2.com>
Date: Thursday, October 11, 2007 7:46 pm
Subject: Re: Memory Issues in Sample Server Code
To: Apache AXIS C User List <ax...@ws.apache.org>

> David Klassen wrote:
> > Right this is what I have already done, using gnuthilla and 
> without 
> > gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or 
> v1.0.0 
> > causes the size of  httpd.exe to grow continually. I 
> decided to post 
> > bug  *AXIS2C-717 
> <https://issues.apache.org/jira/browse/AXIS2C-717>* 
> > detailing where the memory of httpd.exe kept growing and 
> eventually 
> > encountered an unhandled exception.
> Please note that, even though there seems to be a growith, if 
> you keep 
> on sending requests, you would notice that, at some point, it 
> drops 
> back. This is dues to the pooling behaviors of apache. I cannot 
> recall 
> an exact number, after which it would drop, possibly you have to 
> send 
> few hundred requests.
> 
> Samisa...
> >
> > ----- Original Message -----
> > From: Dumindu Pallewela <du...@wso2.com>
> > Date: Thursday, October 11, 2007 2:27 pm
> > Subject: Re: Memory Issues in Sample Server Code
> > To: Apache AXIS C User List <ax...@ws.apache.org>
> >
> > > Hi David,
> > >
> > > As we use apr pools for memory management in mod_axis2, the loss
> > > that you see (when deployed in apache2) is most _likely_ not 
> a bug.
> > > Rather, it should be because that is how apr pools work. 
> They do not
> > > necessarily free up memory immediately after a pool is destroyed.
> > >
> > > The best way to test the apache module (If this isn't what you
> > > already did!), is to run the client repeatedly and check if the
> > > memory grows significantly.
> > >
> > > HTH,
> > > -Dumindu.
> > >
> > > David Klassen wrote:
> > > > Actually I was using both apache and the 
> axis2_http_server, of
> > > which the axis2_http_server had less memory absorption.
> > > Incidentally I also found a difference in the amount of memory
> > > loss due to version of the axis2c client program used. All tests
> > > were performed using a v1.1.0 based server on Windows. The
> > > client programs were invoked on Linux using both v1.0.0 and
> > > v1.1.0 of axis2c:
> > > >
> > > >
> > > 
> Server                        |  v1.1.0 client   |   v1.0.0 client
> > > > -------------------------------------------------------
> > > >
> > > 
> httpd.exe                    |   24K loss      |   16K loss
> > > > axis2_http_server.exe |     8K
> > > loss      |     
> 4K loss
> > > >
> > > > I then decide to try using a Windows client against a Linux
> > > server. The windows client only used version 1.1.0.  I only
> > > used the Linux axis2_http_server for the server but alternated
> > > between v1.1.0 and v1.0.0. Here are the results:
> > > >
> > > >
> > > >
> > > >
> > > 
> Server                             |   v1.1.0 Window Client
> > > >
> > > > -------------------------------------------------------
> > > >
> > > > axis2_http_server v1.1.0 
> > > |         4K loss
> > > >
> > > > axis2_http_server v1.0.0 
> > > |         no loss
> > > >
> > > > I have already seen both version of the Windows server leak,
> > > however in these tests it shows that  v1.0.0 of the Linux
> > > server did not leak but v1.1.0 does leak. Unfortunately I need
> > > to use the Windows server version for my implementation, so this
> > > does not help in my case. Do you know does axis C++ v1.6 have
> > > memory issues like this on Windows server side? I really 
> need a
> > > version that performs well on Windows.
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Samisa Abeysinghe <sa...@wso2.com>
> > > > Date: Wednesday, October 10, 2007 8:23 pm
> > > > Subject: Re: Memory Issues in Sample Server Code
> > > > To: Apache AXIS C User List <ax...@ws.apache.org>
> > > >
> > > >> There is are memory issues with simple axis server. We 
> got to
> > > >> fix that.
> > > >> In the mean time, could you please try the same tests with
> > > httpd
> > > >> module?I hope that would yield better results.
> > > >>
> > > >> Samisa...
> > > >>
> > > >> David Klassen wrote:
> > > >>> I have been stress testing axis2c for performance (using the
> > > >> echo
> > > >>> sample service), to determine if this platform is a good
> > > >> solution for
> > > >>> my purposes. So far I have been attempting to debug each
> > > >> echo.exe
> > > >>> invocation. Each time I execute the remote client
> > > invocation,
> > > >> the
> > > >>> server process increments its used memory by 4 KB. When the
> > > >> service
> > > >>> thread completes this memory is not deallocated. During the
> > > >> debug
> > > >>> session I notice that:
> > > >>>
> > > >>>    echo_invoke
> > > >>>
> > > >>> is the only DLL function called. The other echo_skeleton.c
> > > >> memory
> > > >>> management functions are not called:
> > > >>>
> > > >>>    echo_free
> > > >>>    axis2_remove_instance
> > > >>>
> > > >>> Can anyone suggest how I might configure axis2c to free
> > > memory
> > > >> for
> > > >>> each echo service invocation (ie. per request)?
> > > >>
> > > >> --
> > > >> Samisa Abeysinghe : WSO2 WSF/PHP
> > > >> "http://wso2.org/projects/wsf/php?WSO2 Web Services
> > > Framework%2FPHP - Open source PHP extention for providing and
> > > consuming Web services in PHP"
> > > >>
> > > >>
> > > >> ----------------------------------------------------------
> ----
> > > ---
> > > >> ----
> > > >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > > >>
> > > >>
> > > >
> > >
> > >
> > > --
> > > Dumindu Pallewela
> > > http://blog.dumindu.com
> > > GPG ID: 0x9E131672
> > >
> > > WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
> > >
> > > 
> 
> 
> -- 
> Samisa Abeysinghe : WSO2 WSF/PHP
> "http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
> 
> 
> -----------------------------------------------------------------
> ----
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 
> 

Re: Memory Issues in Sample Server Code

Posted by Samisa Abeysinghe <sa...@wso2.com>.
David Klassen wrote:
> Right this is what I have already done, using gnuthilla and without 
> gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or v1.0.0 
> causes the size of  httpd.exe to grow continually. I decided to post 
> bug  *AXIS2C-717 <https://issues.apache.org/jira/browse/AXIS2C-717>* 
> detailing where the memory of httpd.exe kept growing and eventually 
> encountered an unhandled exception.
Please note that, even though there seems to be a growith, if you keep 
on sending requests, you would notice that, at some point, it drops 
back. This is dues to the pooling behaviors of apache. I cannot recall 
an exact number, after which it would drop, possibly you have to send 
few hundred requests.

Samisa...
>
> ----- Original Message -----
> From: Dumindu Pallewela <du...@wso2.com>
> Date: Thursday, October 11, 2007 2:27 pm
> Subject: Re: Memory Issues in Sample Server Code
> To: Apache AXIS C User List <ax...@ws.apache.org>
>
> > Hi David,
> >
> > As we use apr pools for memory management in mod_axis2, the loss
> > that you see (when deployed in apache2) is most _likely_ not a bug.
> > Rather, it should be because that is how apr pools work. They do not
> > necessarily free up memory immediately after a pool is destroyed.
> >
> > The best way to test the apache module (If this isn't what you
> > already did!), is to run the client repeatedly and check if the
> > memory grows significantly.
> >
> > HTH,
> > -Dumindu.
> >
> > David Klassen wrote:
> > > Actually I was using both apache and the axis2_http_server, of
> > which the axis2_http_server had less memory absorption.
> > Incidentally I also found a difference in the amount of memory
> > loss due to version of the axis2c client program used. All tests
> > were performed using a v1.1.0 based server on Windows. The
> > client programs were invoked on Linux using both v1.0.0 and
> > v1.1.0 of axis2c:
> > >
> > >
> > Server                        |  v1.1.0 client   |   v1.0.0 client
> > > -------------------------------------------------------
> > >
> > httpd.exe                    |   24K loss      |   16K loss
> > > axis2_http_server.exe |     8K
> > loss      |     4K loss
> > >
> > > I then decide to try using a Windows client against a Linux
> > server. The windows client only used version 1.1.0.  I only
> > used the Linux axis2_http_server for the server but alternated
> > between v1.1.0 and v1.0.0. Here are the results:
> > >
> > >
> > >
> > >
> > Server                             |   v1.1.0 Window Client
> > >
> > > -------------------------------------------------------
> > >
> > > axis2_http_server v1.1.0 
> > |         4K loss
> > >
> > > axis2_http_server v1.0.0 
> > |         no loss
> > >
> > > I have already seen both version of the Windows server leak,
> > however in these tests it shows that  v1.0.0 of the Linux
> > server did not leak but v1.1.0 does leak. Unfortunately I need
> > to use the Windows server version for my implementation, so this
> > does not help in my case. Do you know does axis C++ v1.6 have
> > memory issues like this on Windows server side? I really need a
> > version that performs well on Windows.
> > >
> > >
> > > ----- Original Message -----
> > > From: Samisa Abeysinghe <sa...@wso2.com>
> > > Date: Wednesday, October 10, 2007 8:23 pm
> > > Subject: Re: Memory Issues in Sample Server Code
> > > To: Apache AXIS C User List <ax...@ws.apache.org>
> > >
> > >> There is are memory issues with simple axis server. We got to
> > >> fix that.
> > >> In the mean time, could you please try the same tests with
> > httpd
> > >> module?I hope that would yield better results.
> > >>
> > >> Samisa...
> > >>
> > >> David Klassen wrote:
> > >>> I have been stress testing axis2c for performance (using the
> > >> echo
> > >>> sample service), to determine if this platform is a good
> > >> solution for
> > >>> my purposes. So far I have been attempting to debug each
> > >> echo.exe
> > >>> invocation. Each time I execute the remote client
> > invocation,
> > >> the
> > >>> server process increments its used memory by 4 KB. When the
> > >> service
> > >>> thread completes this memory is not deallocated. During the
> > >> debug
> > >>> session I notice that:
> > >>>
> > >>>    echo_invoke
> > >>>
> > >>> is the only DLL function called. The other echo_skeleton.c
> > >> memory
> > >>> management functions are not called:
> > >>>
> > >>>    echo_free
> > >>>    axis2_remove_instance
> > >>>
> > >>> Can anyone suggest how I might configure axis2c to free
> > memory
> > >> for
> > >>> each echo service invocation (ie. per request)?
> > >>
> > >> --
> > >> Samisa Abeysinghe : WSO2 WSF/PHP
> > >> "http://wso2.org/projects/wsf/php?WSO2 Web Services
> > Framework%2FPHP - Open source PHP extention for providing and
> > consuming Web services in PHP"
> > >>
> > >>
> > >> --------------------------------------------------------------
> > ---
> > >> ----
> > >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > >>
> > >>
> > >
> >
> >
> > --
> > Dumindu Pallewela
> > http://blog.dumindu.com
> > GPG ID: 0x9E131672
> >
> > WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
> >
> > 


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
Right this is what I have already done, using gnuthilla and without gnuthilla. Unfortunately using mod_axis2.so with v1.1.0 or v1.0.0 causes the size of  httpd.exe to grow continually. I decided to post bug  AXIS2C-717 detailing where the memory of httpd.exe kept growing and eventually encountered an unhandled exception. 

----- Original Message -----
From: Dumindu Pallewela <du...@wso2.com>
Date: Thursday, October 11, 2007 2:27 pm
Subject: Re: Memory Issues in Sample Server Code
To: Apache AXIS C User List <ax...@ws.apache.org>

> Hi David,
> 
> As we use apr pools for memory management in mod_axis2, the loss
> that you see (when deployed in apache2) is most _likely_ not a bug.
> Rather, it should be because that is how apr pools work. They do not
> necessarily free up memory immediately after a pool is destroyed.
> 
> The best way to test the apache module (If this isn't what you
> already did!), is to run the client repeatedly and check if the
> memory grows significantly.
> 
> HTH,
> -Dumindu.
> 
> David Klassen wrote:
> > Actually I was using both apache and the axis2_http_server, of 
> which the axis2_http_server had less memory absorption. 
> Incidentally I also found a difference in the amount of memory 
> loss due to version of the axis2c client program used. All tests 
> were performed using a v1.1.0 based server on Windows. The 
> client programs were invoked on Linux using both v1.0.0 and 
> v1.1.0 of axis2c:
> > 
> > 
> Server                        |  v1.1.0 client   |   v1.0.0 client
> > -------------------------------------------------------
> > 
> httpd.exe                    |   24K loss      |   16K loss
> > axis2_http_server.exe |     8K 
> loss      |     4K loss
> > 
> > I then decide to try using a Windows client against a Linux 
> server. The windows client only used version 1.1.0.  I only 
> used the Linux axis2_http_server for the server but alternated 
> between v1.1.0 and v1.0.0. Here are the results:
> > 
> > 
> > 
> > 
> Server                             |   v1.1.0 Window Client
> > 
> > -------------------------------------------------------
> > 
> > axis2_http_server v1.1.0  
> |         4K loss
> > 
> > axis2_http_server v1.0.0  
> |         no loss 
> > 
> > I have already seen both version of the Windows server leak, 
> however in these tests it shows that  v1.0.0 of the Linux 
> server did not leak but v1.1.0 does leak. Unfortunately I need 
> to use the Windows server version for my implementation, so this 
> does not help in my case. Do you know does axis C++ v1.6 have 
> memory issues like this on Windows server side? I really need a 
> version that performs well on Windows.
> > 
> > 
> > ----- Original Message -----
> > From: Samisa Abeysinghe <sa...@wso2.com>
> > Date: Wednesday, October 10, 2007 8:23 pm
> > Subject: Re: Memory Issues in Sample Server Code
> > To: Apache AXIS C User List <ax...@ws.apache.org>
> > 
> >> There is are memory issues with simple axis server. We got to 
> >> fix that. 
> >> In the mean time, could you please try the same tests with 
> httpd 
> >> module?I hope that would yield better results.
> >>
> >> Samisa...
> >>
> >> David Klassen wrote:
> >>> I have been stress testing axis2c for performance (using the 
> >> echo 
> >>> sample service), to determine if this platform is a good 
> >> solution for 
> >>> my purposes. So far I have been attempting to debug each 
> >> echo.exe 
> >>> invocation. Each time I execute the remote client 
> invocation, 
> >> the 
> >>> server process increments its used memory by 4 KB. When the 
> >> service 
> >>> thread completes this memory is not deallocated. During the 
> >> debug 
> >>> session I notice that:
> >>>
> >>>    echo_invoke
> >>>
> >>> is the only DLL function called. The other echo_skeleton.c 
> >> memory 
> >>> management functions are not called:
> >>>
> >>>    echo_free
> >>>    axis2_remove_instance
> >>>
> >>> Can anyone suggest how I might configure axis2c to free 
> memory 
> >> for 
> >>> each echo service invocation (ie. per request)?
> >>
> >> -- 
> >> Samisa Abeysinghe : WSO2 WSF/PHP
> >> "http://wso2.org/projects/wsf/php?WSO2 Web Services 
> Framework%2FPHP - Open source PHP extention for providing and 
> consuming Web services in PHP"
> >>
> >>
> >> --------------------------------------------------------------
> ---
> >> ----
> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >>
> >>
> > 
> 
> 
> -- 
> Dumindu Pallewela
> http://blog.dumindu.com
> GPG ID: 0x9E131672
> 
> WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"
> 
> 

Re: Memory Issues in Sample Server Code

Posted by Dumindu Pallewela <du...@wso2.com>.
Hi David,

As we use apr pools for memory management in mod_axis2, the loss
that you see (when deployed in apache2) is most _likely_ not a bug.
Rather, it should be because that is how apr pools work. They do not
necessarily free up memory immediately after a pool is destroyed.

The best way to test the apache module (If this isn't what you
already did!), is to run the client repeatedly and check if the
memory grows significantly.

HTH,
-Dumindu.

David Klassen wrote:
> Actually I was using both apache and the axis2_http_server, of which the axis2_http_server had less memory absorption. Incidentally I also found a difference in the amount of memory loss due to version of the axis2c client program used. All tests were performed using a v1.1.0 based server on Windows. The client programs were invoked on Linux using both v1.0.0 and v1.1.0 of axis2c:
> 
> Server                        |  v1.1.0 client   |   v1.0.0 client
> -------------------------------------------------------
> httpd.exe                    |   24K loss      |   16K loss
> axis2_http_server.exe |     8K loss      |     4K loss
> 
> I then decide to try using a Windows client against a Linux server. The windows client only used version 1.1.0.  I only used the Linux axis2_http_server for the server but alternated between v1.1.0 and v1.0.0. Here are the results:
> 
> 
> 
> Server                             |   v1.1.0 Window Client
> 
> -------------------------------------------------------
> 
> axis2_http_server v1.1.0  |         4K loss
> 
> axis2_http_server v1.0.0  |         no loss 
> 
> I have already seen both version of the Windows server leak, however in these tests it shows that  v1.0.0 of the Linux server did not leak but v1.1.0 does leak. Unfortunately I need to use the Windows server version for my implementation, so this does not help in my case. Do you know does axis C++ v1.6 have memory issues like this on Windows server side? I really need a version that performs well on Windows.
> 
> 
> ----- Original Message -----
> From: Samisa Abeysinghe <sa...@wso2.com>
> Date: Wednesday, October 10, 2007 8:23 pm
> Subject: Re: Memory Issues in Sample Server Code
> To: Apache AXIS C User List <ax...@ws.apache.org>
> 
>> There is are memory issues with simple axis server. We got to 
>> fix that. 
>> In the mean time, could you please try the same tests with httpd 
>> module?I hope that would yield better results.
>>
>> Samisa...
>>
>> David Klassen wrote:
>>> I have been stress testing axis2c for performance (using the 
>> echo 
>>> sample service), to determine if this platform is a good 
>> solution for 
>>> my purposes. So far I have been attempting to debug each 
>> echo.exe 
>>> invocation. Each time I execute the remote client invocation, 
>> the 
>>> server process increments its used memory by 4 KB. When the 
>> service 
>>> thread completes this memory is not deallocated. During the 
>> debug 
>>> session I notice that:
>>>
>>>    echo_invoke
>>>
>>> is the only DLL function called. The other echo_skeleton.c 
>> memory 
>>> management functions are not called:
>>>
>>>    echo_free
>>>    axis2_remove_instance
>>>
>>> Can anyone suggest how I might configure axis2c to free memory 
>> for 
>>> each echo service invocation (ie. per request)?
>>
>> -- 
>> Samisa Abeysinghe : WSO2 WSF/PHP
>> "http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
>>
>>
>> -----------------------------------------------------------------
>> ----
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>>
> 


-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"


Re: Memory Issues in Sample Server Code

Posted by David Klassen <db...@shaw.ca>.
Actually I was using both apache and the axis2_http_server, of which the axis2_http_server had less memory absorption. Incidentally I also found a difference in the amount of memory loss due to version of the axis2c client program used. All tests were performed using a v1.1.0 based server on Windows. The client programs were invoked on Linux using both v1.0.0 and v1.1.0 of axis2c:

Server                        |  v1.1.0 client   |   v1.0.0 client
-------------------------------------------------------
httpd.exe                    |   24K loss      |   16K loss
axis2_http_server.exe |     8K loss      |     4K loss

I then decide to try using a Windows client against a Linux server. The windows client only used version 1.1.0.  I only used the Linux axis2_http_server for the server but alternated between v1.1.0 and v1.0.0. Here are the results:



Server                             |   v1.1.0 Window Client

-------------------------------------------------------

axis2_http_server v1.1.0  |         4K loss

axis2_http_server v1.0.0  |         no loss 

I have already seen both version of the Windows server leak, however in these tests it shows that  v1.0.0 of the Linux server did not leak but v1.1.0 does leak. Unfortunately I need to use the Windows server version for my implementation, so this does not help in my case. Do you know does axis C++ v1.6 have memory issues like this on Windows server side? I really need a version that performs well on Windows.


----- Original Message -----
From: Samisa Abeysinghe <sa...@wso2.com>
Date: Wednesday, October 10, 2007 8:23 pm
Subject: Re: Memory Issues in Sample Server Code
To: Apache AXIS C User List <ax...@ws.apache.org>

> There is are memory issues with simple axis server. We got to 
> fix that. 
> In the mean time, could you please try the same tests with httpd 
> module?I hope that would yield better results.
> 
> Samisa...
> 
> David Klassen wrote:
> > I have been stress testing axis2c for performance (using the 
> echo 
> > sample service), to determine if this platform is a good 
> solution for 
> > my purposes. So far I have been attempting to debug each 
> echo.exe 
> > invocation. Each time I execute the remote client invocation, 
> the 
> > server process increments its used memory by 4 KB. When the 
> service 
> > thread completes this memory is not deallocated. During the 
> debug 
> > session I notice that:
> >
> >   echo_invoke
> >
> > is the only DLL function called. The other echo_skeleton.c 
> memory 
> > management functions are not called:
> >
> >   echo_free
> >   axis2_remove_instance
> >
> > Can anyone suggest how I might configure axis2c to free memory 
> for 
> > each echo service invocation (ie. per request)?
> 
> 
> -- 
> Samisa Abeysinghe : WSO2 WSF/PHP
> "http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"
> 
> 
> -----------------------------------------------------------------
> ----
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 
> 

Re: Memory Issues in Sample Server Code

Posted by Samisa Abeysinghe <sa...@wso2.com>.
There is are memory issues with simple axis server. We got to fix that. 
In the mean time, could you please try the same tests with httpd module?
I hope that would yield better results.

Samisa...

David Klassen wrote:
> I have been stress testing axis2c for performance (using the echo 
> sample service), to determine if this platform is a good solution for 
> my purposes. So far I have been attempting to debug each echo.exe 
> invocation. Each time I execute the remote client invocation, the 
> server process increments its used memory by 4 KB. When the service 
> thread completes this memory is not deallocated. During the debug 
> session I notice that:
>
>   echo_invoke
>
> is the only DLL function called. The other echo_skeleton.c memory 
> management functions are not called:
>
>   echo_free
>   axis2_remove_instance
>
> Can anyone suggest how I might configure axis2c to free memory for 
> each echo service invocation (ie. per request)?


-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org