Showing posts with label software service. Show all posts
Showing posts with label software service. Show all posts

Wednesday, December 29, 2010

Peformance Testing Software Services-I

I think it is important to discuss how software services are different from software programs and in particular map the differences between services and programs in the domain of software performance. So let's begin....
What is a software service? (How is it different from a software program e.g. Microsoft Excel)
Examples of software services range from google's translator to XBOX live from Microsoft, from google maps to Yahoo answers. Given that this is a diverse group, it is still not difficult to outline the properties that all of the above have in common :
  • They are always ON (always there), in other words there is no down time
  • They are accessible from everywhere (most respectable services are available globally, but even if you think about the US, most of these services are as available in washington state as they are in florida)
  • They can support multiple users at the same time, (most of these services have thousands of users active at any given unit of time)


  To summarize , a software service is a piece of software that is always available(always in memory of some coputer server somewhere) and is accessible to all its clients (via some agreed upon protocol) and can support multiple users at the same time.


Performance of software services: Now that we know what traits software services have in common, lets ask ourselves what that means for the performance of such services.
For a service to be always ON , or always available it has to reside in memory of a computer(multiple computers) all the time, it(some instruction inside it) should always be in the ready state to be picked up by the processor, it should have the connection to all the resources (database, file shares etc) open at all times (this is not a requirement but it is an optimization that can be assumed for most services). This has some very important connotations specially with regard to physical memory. The memory used by the service should not keep increasing , in other words new memory should be used and then returned back to the OS after some time. Let me explain this a bit...if the memory usage of the service keeps going up with time it will eventually exhaust the physical memory limit for a process. (Remember memory management in OS, see windows internals by Microsoft press for a refresher). This, what i just desrcibed, is a common issue plaguing software services and it is called a Memory Leak. A memory leak is bad for any kind of software but especially services, since they are always ON ( I can't emphasize that enough)
It's not just memory leaks, imagine that we are designing a weather web service , which is accessible through a web browser. The weather service gives you the average temprature at your location by deducing your location based on your IP address (this is called reverse IP and most web portals use it). Let's say this IP-geo location map is stored in the database. Every time a user accesses the web service, the users IP address is looked up in the database and an associated location is retrieved. Since this is a service and is always ON, we would need to always have an open connection to the database (establishing data base connections is expensive).



I hope this makes you appreciate the performance traits of software services. In the next post I will talk more about the performance of software services.... so long till then.