4 days ago

On Thursday, 28 August 2025 at 08:53:30 UTC, Denis Feklushkin wrote:

>

Now its performance is:

Requests per second: 530.44 [#/sec] (mean)

this is near to the performance of other methods mentioned earlier

I made small changes in events handling in vibe-d-postgresql 3.2.1-rc1
Now all three methdos on my machine have same performance near to ~540 RPS

4 days ago

On Wednesday, 27 August 2025 at 12:54:37 UTC, Andrea Fontana wrote:

> >

ab is old and single threaded, use wrk it’s multithreaded and supports lua scripts to generate requests.

I agree. Try with wrk, wrk2, bombardier...

I used wrk for the first time
Results matched the ab tool (~540 RPS):

$ wrk -t 10 -c 20 -d 5 http://localhost:8080/oldschool
Running 5s test @ http://localhost:8080/oldschool
  10 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    37.66ms   13.67ms  77.06ms   72.25%
    Req/Sec    52.86     17.26    80.00     74.80%
  2643 requests in 5.01s, 601.56KB read
  Socket errors: connect 0, read 2643, write 0, timeout 0
  Non-2xx or 3xx responses: 2643
Requests/sec:    527.93
Transfer/sec:    120.16KB

$ wrk -t 10 -c 20 -d 5 http://localhost:8080/normal
Running 5s test @ http://localhost:8080/normal
  10 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    35.98ms   13.80ms  75.36ms   72.60%
    Req/Sec    55.36     22.38   280.00     70.12%
  2779 requests in 5.10s, 632.51KB read
  Socket errors: connect 0, read 2779, write 0, timeout 0
  Non-2xx or 3xx responses: 2779
Requests/sec:    544.88
Transfer/sec:    124.02KB

$ wrk -t 10 -c 20 -d 5 http://localhost:8080/special
Running 5s test @ http://localhost:8080/special
  10 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    36.85ms   13.50ms  76.97ms   72.86%
    Req/Sec    53.91     17.20   101.00     74.10%
  2706 requests in 5.10s, 615.90KB read
  Socket errors: connect 0, read 2706, write 0, timeout 0
  Non-2xx or 3xx responses: 2706
Requests/sec:    530.60
Transfer/sec:    120.77KB
4 days ago

On Thursday, 28 August 2025 at 11:42:33 UTC, Denis Feklushkin wrote:

>

On Wednesday, 27 August 2025 at 12:54:37 UTC, Andrea Fontana wrote:

> >

ab is old and single threaded, use wrk it’s multithreaded and supports lua scripts to generate requests.

I agree. Try with wrk, wrk2, bombardier...

I used wrk for the first time
Results matched the ab tool (~540 RPS):

Does dpq2 also single-threaded solution as vibe.d?

4 days ago

On Thursday, 28 August 2025 at 13:43:06 UTC, Serg Gini wrote:

>

Does dpq2 also single-threaded solution as vibe.d?

No (with some limitations)

And, for example, you can make two different SQL requests simultaneously in different Vibe.d threads

But it is need to understand that multithreading by itself will not make queries execution more performant. In addition, the number of available connections to the Postgres is usually limited to a small number, because Postgres is designed in such a way that one Postgres worker process handles one connection at same time.

1 2
Next ›   Last »