How to determine the number of thread for each user in Jetty - performance

When I look into Jetty. I see this sentence and as a newbie for Jetty.
Load generators should be written in asynchronous programming style, so that limited threads does not limit the maximum number of users that can be simulated. If the generator is not asynchronous, then a thread pool of 2000 may only be able to simulate 500 or less users. The Jetty HttpClient is an ideal basis for building a load generator, as it is asynchronous and can be used to simulate many thousands of connections (see the Cometd Load Tester for a good example of a realistic load generator).
I wonder how to determine the How to determine the number of thread for each user in Jetty.
Since I don't know how to test and which tool should I use.
Any hint will be appreciated.
Please.

The number of threads you will require depends on the kind of load your application will need.
A typical web page is currently about 30 resources totaling about 40 MB that need to be requested for the web page to be "complete" and can be rendered fully.
If you use HTTP/2, which will get data faster, you will have a greater demand on the thread pool than if you use HTTP/1.1.
But lets say you need Jetty to supply data to a mobile chess playing app, less connections overall, you now have a much lower demand of threads per user.
The advice is as it always is, monitor your applications behavior, now, and in testing, and in QA, and in production. Learn the behavior, and adjust your configuration accordingly.
It is impossible to "do the math" and set the perfect configuration up front without monitoring. You will be adjusting these configurations over time as your application evolves and you learn more about the behaviors within your application.

Related

spring boot maximum throughput can a rest api like get support

I was doing a project that needs to support a cluster of 30k nodes, all those nodes periodic calls the api to get data.
I want to have the maximum amount of concurrent get operation per second, and due to it is get operation, it must be in synced way.
And my local pc is 32GB 8Core, spring boot version is 2.6.6, configurations are like
server.tomcat.max-connections=10000
server.tomcat.threads.max=800
I use jmeter to do concurrent test, and the through out is around 1k/s, average response time is 2 seconds.
Is there any way to make it support more requests per second?
Hard to say without details on the web service, implementation of what it actually does and where the bottleneck actually is (threads, connections, CPU, memory or others) but, as a general recommendation, using non-blocking APIs would help but it should then be full non-blocking to actually make a real difference.
I mean that just adding Webflux and have blocking DB would not improve so much.
Furthermore, all improvements in execute time would help so check if you can improve the code and maybe have a look at trying to go native (which will come "built in" in Boot 3.X btw)

detect scaling problem form performance test result

I conducted performance testing on e-commerce website and I have the test results with some matrices. I already found some problems on some component for example on checkout or post login with high response time and error. But I also would like to find issues that are limiting the application to scale. I only did the testing on the application server. And I observed that CPU , I/O rate are very stable as well. But still the application gives high response time. Is there any other way I can determine from the test result why it is not scaling well? Thank!
From JMeter test result only - unlikely, JMeter just sends requests, waits for the responses and measures the time in-between plus collects some extra metrics like connect time and latency, see the JMeter Glossary for full list with explanations
The integrated system acts at the speed of its slowest component, possible reasons could be in:
Network issues (i.e. lack of bandwidth, faulty router, long DNS resolution time, etc.)
Your application is not properly configured for high loads. Inspect the current setup of the application in terms of thread pools, maximum number of open connections, any limitations on resource usage, etc. Look for documentation on performance tuning of individual middleware compoments as well.
Repeat your test run with a profiler tool telemetry enabled or look at the APM tool output for the test time frame if the tool is in place, it will allow you do perform a deep dive into what's going on under the hood of this or that function call as it might be inefficient algorithm or a slow database query

how to do load test to find the maximum vusers that the application can handle?

We have a PHP application to do load test. The application team wants to know that, up to how many users that the application can be capable to withstand without any crashes.
How to do the load test on the same.. Please help us.
Thanks in advance
Its a boardroom question, application system capacity depends upon the application design and server where application is hosted. Ultimately this depends the purpose of application (public or private) and customer requirements (number of users).
You can find notes on test strategy for loading application in MSDN website Real-World Load Testing Tips to Avoid Bottlenecks When Your Web App Goes Live. My suggestion is application should able to manage atleast 10% maximum expected user simultaneously (till its popular... !!!!).
Try record and run Jmeter.
Use Summary Report, Summary Error Report and View Results Tree to see your server's health.
Keep adding thread counts till you realized all your thread group assertion starts failing.
My application includes complex data retrieval from RDC using XML. If error are less than 2% total test, i consider it as healthy. My app can handle 50 threads consecutively easily. Try yours. good luck.
You can identify the number of actual users experimentally.
At the first, make virtual users behavior like real user. Follow this link to get it.
Then increase number of users and observe application behavior. To scedule increasing number of users, you can use Throughput Shaping Timer

How many threads/users can one Windows client simulate during my load test?

I'm planning to do a load test of our ASP/.NET web application and need to simulate about 600 concurrent users on our system.
Initially we'll just be running the load test tools (probabaly JMETER or WCAT/WAST) from our personal workstations which are Windows 7/32 Bit Dells (Dual Core processors). I was wondering about how many users I can expect to be able to simulate from one client.
If I can easily do 200 users per client, I'll need to identify 2-3 more clients for the test.
I wanted to ask the community based on their experience how many users I should expect per client on a standard windows box.
Any help is appreciated!
This highly depends on the test plan itself and cannot be answered that easily.
If you for example have 500 users that just do one request and then have a waiting timer for five minutes, this should work. If all users constantly do requests without waiting, this will put much more load on your machine.
It depends on the samplers in use. HTTP requests are less costly than SOAP requests for example.
It also depends on the listeners you have active.
For a normal load test I usually have around 100-300 threads active. I would suggest to start with such a number and to monitor the load (CPU, network) on your client to see how much potential there is.
Without more details about the test scenarios and the hardware, it is hard to give specific answers. But our Load Tester product can (usually) handle this level of users pretty easily on a single machine (assuming relatively modern hardware). The testing tool should scale linearly up to a point, so you should be able to get a good estimate by running 50 users through a scenario that is similar to what you expect to test.

Measure performance of a Web Server

Which tools can be used to measure performance of a webserver?
To test a webserver, you can use Apache Jmeter.
To see where is the bottleneck you have to flood your server application.
ApacheBench (ab) can do this. Here is a tool to get the server HTTP response code (ab) just says there is an HTTP error, and to automate test runs:
dsec.com/source/ab.c.txt
This program also gives useful tips about how to configure Linux and Windows (TCP/IP system options) to get the best possible performances.
It always depends on the setup.
Depending on the application there can be different bottlenecks.
Sometimes its the CPU, sometimtes the database connections, sometimes the sockets, sometimes the hard disc etc...
Most common practice is to use siege (simple command line tool) and increase the concurrent connections and see how many transactions per second go through.
It will increase per connection until an optimum is reached, then it will slowly decrase.
You can produce a set of urls that are randomly accessed, maby biased and/or send random data, request random ids etc to simulate more "real" clients.
Completely depends on your application whether this is relevant.

Resources