Saturday 29 April 2023

Performance Testing - Common Database issues | DB issues in Performance testing

Here are some common DB performance issues and their solutions:

1. Slow queries: Queries that take a long time to execute can cause the database to become unresponsive. One solution is to optimize the queries by using indexes and avoiding unnecessary joins.

2. Too many connections: When too many connections are established to a database, it can cause performance issues. One solution is to limit the number of connections or to use a connection pool.

3. Poor indexing: Without proper indexing, the database may have to scan the entire table to find the data it needs, which can slow down performance. One solution is to create indexes on the columns used in frequently executed queries.

4. Insufficient hardware resources: If the database server does not have enough CPU, memory, or disk resources, it can cause performance issues. One solution is to upgrade the hardware or optimize the configuration of the existing hardware.

5. Locking and blocking: When multiple users access the same data, locking and blocking can occur, causing performance issues. One solution is to use row-level locking instead of table-level locking.

6. Fragmentation: Over time, data can become fragmented, causing performance issues. One solution is to perform regular maintenance tasks, such as defragmenting the database.

7. Poorly designed schema: A poorly designed database schema can cause performance issues. One solution is to redesign the schema to better reflect the application's data access patterns.

8. Inefficient use of database connections: If an application does not use database connections efficiently, it can cause performance issues. One solution is to use connection pooling or optimize the code that accesses the database.

Tuesday 25 April 2023

VUser memory foot prints load runner | Calculating Memory Requirements for Vusers in LoadRunner: Protocol-Specific Considerations

How much memory will take by a single vuser when we run the script in load runner?

The number of bytes consumed by each protocol in LoadRunner can vary depending on several factors such as the size and complexity of the script, the type of application being tested, and the specific actions being performed by the Vusers. LoadRunner provides a resource monitoring tool called "Performance Monitor" that can be used to track the memory usage of a Vuser during a load test. By analyzing the memory usage data collected by the Performance Monitor, you can estimate the amount of memory consumed by a single Vuser. Here is my experience with different protocols memory foot prints.

Web HTTP/HTML Protocol: a single Vuser running a script with the Web HTTP/HTML protocol can consume anywhere from a few hundred kilobytes to several gigabytes of memory depending on the factors mentioned above. It is important to note that the memory usage can increase over time as the Vuser executes more transactions and the amount of data being processed and stored in memory grows. In my previous testing with 1000 user load, each Vuser took 5MB -50 MB per transaction.

Web Services API Protocol: In this the Vuser will take very less amount of memory that is from 1MB - 5 MB, also note that in some cases it may raise and go up to 50 MB asvwell.

Citrix Protocol: The minimum number of bytes consumed by the Citrix protocol is around 5-10 kilobytes per transaction, which includes the Citrix-specific protocol overhead. The maximum number of bytes can be several hundred kilobytes, depending on the size of the screen being transferred.

SAP GUI Protocol: The minimum number of bytes consumed by the SAP GUI protocol is around 50-100 kilobytes per transaction, which includes the SAP-specific protocol overhead. The maximum number of bytes can be several megabytes, depending on the size of the data being transferred.

Oracle NCA Protocol: The minimum number of bytes consumed by the Oracle NCA protocol is around 50-100 kilobytes per transaction, which includes the protocol overhead. The maximum number of bytes can be several megabytes, depending on the size of the data being transferred.

TruClient Protocol: The number of bytes consumed by can vary depending on the complexity of the web application being tested, the number of browser requests and responses, and the specific actions being performed by the Vuser. Some approximate numbers are

The minimum number of bytes consumed by TruClient is around 200-300 bytes per transaction, which includes the HTTP request and response headers. However, this can vary based on the size and complexity of the web page being loaded.

The maximum number of bytes consumed by TruClient can be several megabytes, depending on the size of the web page being loaded, the number of assets (such as images and videos) being transferred, and the specific actions being performed by the Vuser.

It's important to remember that these are only estimates, and the precise amount of bytes used by each transaction can change depending on a variety of different variables. It is therefore advised to count the precise number of bytes used by each transaction using LoadRunner's monitoring tools or other third-party tools while the script is being executed.

Wednesday 19 April 2023

Neotys team server cannot be reached. please check the server configuration error in neoload

The error message suggests that there may be an issue with the configuration of the Neotys team server. Here are a few steps you can try to resolve the issue:


  • Check the server configuration: Ensure that the server configuration is correct and that the necessary services are running. You may want to consult the documentation or contact the vendor for further assistance.

  • Check network connectivity: Verify that the team server is accessible from the network where you are trying to connect. Check if there are any network issues or firewalls that could be blocking the connection.

  • Restart the team server: Try restarting the Neotys team server and see if this resolves the issue.

  • Update the team server: If there is an available update for the team server, consider updating to the latest version as it may address the issue you are facing.

  • Contact Neotys support: If the above steps do not resolve the issue, you may want to contact Neotys support for further assistance. They should be able to provide more detailed troubleshooting steps and help you resolve the issue.

Tuesday 11 April 2023

java.lang.runtime exception unable to resolve service by in working protec:unable to execute protoc binary

java.lang.runtime exception unable to resolve service by in working protec:unable to execute protoc binary



If your Jmeter script throws this error for gRPC script it could be related to the protocol buffer (protobuf) binary file not being found or not being able to execute it. To resolve this error, follow these steps:

  • Make sure that protobuf is installed on your system and the binary file is available in the PATH environment variable.
  • Check the JMeter log files for more information about the error, such as the exact path to the protoc binary file.
  • Verify that the protoc binary file is executable by running the following command in a terminal: 
  • 'chmod +x path/to/protoc'
  • If the protoc binary file is not available on your system, download it from the official protobuf website and add the binary file to the PATH environment variable.
  • Check JMeter and gRPC versions
  • Restart JMeter and try running your test plan again.

gRPC vs. REST API

  • RESTful APIs and gRPC have significant differences in terms of their underlying technology, data format, and API contract requirements.
  • Unlike RESTful APIs that use HTTP/1.1, gRPC is built on top of the newer and more efficient HTTP/2 protocol. This allows for faster communication and reduced latency, making gRPC ideal for high-performance applications.
  • Another key difference is in the way data is serialized. gRPC uses Protocol Buffers, a binary format that is more compact and efficient compared to the text-based JSON format used by REST. This makes gRPC more suitable for applications with large payloads and high traffic volume.
  • In terms of API contract requirements, gRPC is more strict than REST. The API contract must be clearly defined in the proto file, which serves as the single source of truth for the API. On the other hand, REST's API contract is often looser and more flexible, although it can be defined using OpenAPI.

Overall, both RESTful APIs and gRPC have their strengths and weaknesses, and the choice between the two will depend on the specific needs of the application.

How to create a gRPC script with Jmeter? Jmeter-gRPC protocol load testing

To create a gRPC script with JMeter,

  • Install the gRPC plugin for JMeter. You can find the plugin on the JMeter Plugins website or you can download it using the Plugin Manager in JMeter.
Download the latest version of plug-in from here
  • Create a new Test Plan in JMeter and add a Thread Group.
  • Add a gRPC Sampler to the Thread Group. To do this, right-click on the Thread Group and select "Add > Sampler > gRPC Sampler".
  • Configure the gRPC Sampler. You will need to provide the following information:

  • Server address:  The address of the gRPC server you want to test.
    Service name: The name of the gRPC service you want to test.
    Method name: The name of the method you want to call.
    Request data: The data you want to send to the gRPC server.
    Proto Root Directory: It is the Root Directory path (till protoc only)
    Library Directory: This is the library directory path if any( this is optional)
    Full method: this should be auto populated when you click on the Listing Button
    Optional configuration: Authorization details if any
    Send JSON format with the Request: Your JSON request
  • Add any necessary configuration elements or assertions to the Test Plan.
  • Run the Test Plan and analyze the results.

what is gRPC?

gRPC is an open-source, high-performance, universal Remote Procedure Call (RPC) framework that allows different applications and services to communicate with each other over a network. It was developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).



The gRPC framework is a powerful tool for developing APIs that can handle a high volume of traffic while maintaining performance. It is widely adopted by leading companies to support various use cases, ranging from microservices to web, mobile, and IoT applications.

One of the key features of gRPC is its use of Protobuf (Protocol Buffers) as an Interface Definition Language (IDL) to define data structures and function contracts in a structured format using .proto files. This makes it easier to create and manage APIs while ensuring consistency and compatibility across different platforms and languages.

gRPC uses the Protocol Buffers data format for serializing structured data over the network. It supports multiple programming languages, including C++, Java, Python, Ruby, Go, Node.js, C#, and Objective-C.

gRPC provides a simple and efficient way to define remote procedures and their parameters using an Interface Definition Language (IDL). It generates client and server code automatically based on this IDL specification. The generated code handles all the networking details, allowing developers to focus on the business logic of their applications.

One of the key benefits of gRPC is its high performance. It uses HTTP/2 as its transport protocol, which provides features such as multiplexing, flow control, and header compression, resulting in lower latency and reduced bandwidth usage. Additionally, gRPC supports bi-directional streaming and flow control, making it suitable for building real-time applications.

Wednesday 5 April 2023

gRPC request testing using Vugen Load runner | gRPC performance testing load runner

gRPC is a modern open source high performance RPC frame work that can run in any environment and it's now been around fo4 several years with a growing user base. Here is the process to create a script in vugen
  1. Start by creating a new VuGen script and selecting the "gRPC" protocol under "Web Services" in the protocol selection window.

  2. In the "Vuser_init" section of the script, add the following code to create a gRPC channel and stub

#include "grpc.h"

grpc_channel* channel;
grpc_stub* stub;

int vuser_init()
{
    channel = grpc_insecure_channel_create("localhost:50051", NULL, NULL);
    stub = grpc_stub_create(channel);
    return 0;
}
In the "Action" section of the script, add the gRPC method call code that you want to test. Here's an example using the "SayHello" method from the gRPC "helloworld" example:

#include "helloworld.grpc.pb.h"

int Action()
{
    hello::Greeter::Stub* greeter_stub = hello::Greeter::NewStub(channel);
    hello::HelloRequest request;
    hello::HelloReply reply;
    grpc::ClientContext context;

    request.set_name("world");

    grpc::Status status = greeter_stub->SayHello(&context, request, &reply);

    if (status.ok()) {
        lr_output_message("Greeting: %s", reply.message().c_str());
    } else {
        lr_output_message("RPC failed: %s", status.error_message().c_str());
    }

    return 0;
}

  1. Finally, in the "Vuser_end" section of the script, add the code to clean up the gRPC channel and stub:
int vuser_end()
{
    grpc_channel_destroy(channel);
    grpc_stub_destroy(stub);
    return 0;
}

That's it! You should now have a functional gRPC script in VuGen that you can use for load testing. Just make sure to replace the example method call with the actual gRPC method you want to test.