Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COSo, if I understood correctly the best schema looks the next way: Create the number of I/O threads equal to number of cores in system and use ET epoll_wait. Each thread will have its own subset of fd's. For example 4 threads for IC2Q processor. Each thread is handling 25K connections and in total 100K. And the next question: Do I need to have separate thread that will epoll_wait listener socket and manage in what subset of id's newly accepted socket will be added? And is it thread-safe to add newly accepted fd using epoll_ctl in one thread, while other is making epoll_wait on this subset?
      singulars
    2. COI would wait on all descriptors in all threads, actually. Unless you know that you can win on cache effects by isolating related work on specific CPUs, it's usually a loss to do that kind of partitioning. You end up starving one CPU while another still has work that could be done. And yes: epoll operations are atomic (though obviously you'll need to lock any of your own bookeeping yourself).
      singulars
    3. COHow will ET epoll_wait behave? Will all threads wake up from epoll_wait? Or just only 1 thread? If I understood correctly ET epoll_wait is atomic and will happen only once for ready fd's. For example: I have 2 fds and 2 threads waiting on epoll_wait. 1 fd becomes ready and only 1 thread will be resumed and if other fd will become ready during 1st thread deals with first fd, second thread will be resumed. Andy, Is this correct?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload