Replies: 6 comments 9 replies
-
Hi! HttpUser uses FastHttpUser uses FastHttpUser is faster in the sense that it uses less CPU resources on the load generator, but under normal circumstances (load generator not running out of any resources) there shouldn't be any big differences. Its hard to say what might be causing the jumps you are seeing. There could be some minor differences in the requests sent by the different clients that makes a difference in your particular case. Maybe investigate the payload to see if there is any difference. https://docs.locust.io/en/stable/running-in-debugger.html#print-http-communication |
Beta Was this translation helpful? Give feedback.
-
@cyberw , Could you show an option on how to use users so that each new request goes as a FastHttpUser or FastHttpSession for a more realistic simulation of connecting new browsers? I tried using FastHttpSession and calling the some "close" methods. But in this case I get the same type of "peaks" in the same time intervals.
|
Beta Was this translation helpful? Give feedback.
-
Its a little hard to tell what is causing this. Could be throttling on server side or load gen/OS side (the TCP stack doesn't like processes opening lots of ephemeral ports). Or are you saying you get peaks even when using the built in session object without calling any .close()? |
Beta Was this translation helpful? Give feedback.
-
Oh, and btw, there's some docs about this: https://docs.locust.io/en/stable/writing-a-locustfile.html#connection-reuse |
Beta Was this translation helpful? Give feedback.
-
Are you creating Fast/HttpSession's yourself? Don't do that unless you have some very good reason to... Every User has their own session, use that one. |
Beta Was this translation helpful? Give feedback.
-
Don't create your own session. Just use self.client instead. Creating lots of sessions will overload your OS/TCP stack. If you want to do concurrent requests within the same User, follow the instructions in the docs: https://docs.locust.io/en/stable/increase-performance.html#concurrency |
Beta Was this translation helpful? Give feedback.
-
Hi there!
I encountered the fact that with the same number of requests per minute that I generate using HttpUser and FastHttpUser - I get different response times.
HttpUser has a uniform graph of response times without "high jumps", the FastHttpUser "high jumps up" with a certain periodicity.
I don't understand the difference between them and how they work 😞
Beta Was this translation helpful? Give feedback.
All reactions