pingora icon indicating copy to clipboard operation
pingora copied to clipboard

example of web server uses only single thread, show examples that uses all thread in multi threaded of...

Open sprappcom opened this issue 1 year ago • 5 comments

show examples that uses all thread in multi threaded of:

  1. one process per cpu core (like nginx)
  2. 1 process used by all cpu cores (pls advice on the maximum cores recommended for use with pingora, in golang, optimum cores are 16-24 while 192 cores suffer performance degradation which is the same as using 24 cores actually)

sprappcom avatar May 28 '24 19:05 sprappcom

See https://github.com/cloudflare/pingora/blob/main/docs/user_guide/conf.md You can config the number of threads to use.

eaufavor avatar May 29 '24 16:05 eaufavor

@eaufavor how to hard code pingora to use all threads with the hello world example?

sprappcom avatar May 29 '24 17:05 sprappcom

use all threads

Do you mean let the hello world service use all the threads given or automatically set the thread number to the number of CPUs on a machine?

The service does the former automatically without any configuration needed. The latter is a feature request, which we can add easily.

eaufavor avatar May 30 '24 14:05 eaufavor

@eaufavor the latter.

sprappcom avatar Jun 01 '24 17:06 sprappcom

Okay. That makes sense as a feature request.

eaufavor avatar Jun 03 '24 15:06 eaufavor