Y
Y
yuki2021-10-24 08:38:43
Java
yuki, 2021-10-24 08:38:43

How is a thread allocated to a user and server load limit calculation?

I won't lie and say that I know everything about streams and stuff (otherwise this question would not exist), so it would be very cool if someone could help me understand the topic of streams, in particular the selection of a stream for a user. Also, based on the allocation of a thread for a user, maybe someone knows how to calculate the maximum load on the server on a piece of paper? That is, how many connections he can keep, while not dying from stream starvation.

PS: it is java that is of interest, if it is important
PSS: I tried to find information about the first one on the Internet, but I could not refute or confirm the information there, so I would like to clarify here (it was said about the initial reservation of 128 kb per connection, then the stream expanded to 1 megabyte and something else there)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-10-24
@rPman

From a practical point of view, the surest option is to conduct an experiment on a real load.
All other methods will give an approximate estimate or with an error, with a limit above or below.
You one garbage collector can introduce a noticeable parasitic load outside of the calculation. Also, in addition to the direct costs of working with streams, there are also costs for servicing, for example, file operations, even if they are asynchronous, the resources that are spent on this are not taken out of thin air.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question