[lkml]   [2007]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: epoll,threading
    Hi Arunachalam,

    On Saturday 26 May 2007, Arunachalam wrote:
    > I want to know in detail about , what the events (epoll or /dev/poll or
    > select ) achieve in contrast to thread per client.
    > i can have a thread per client and use send and recv system call directly
    > right? Why do i go for these event mechanisms?

    Try 30.000 clients or more on a x86 32bit box.
    That will show you the difference quite nicely :-)

    More seriously: Thread per client scales only to a certain amount of clients
    per RAM. If you like to scale beyond that to like to minimize your state
    per client. If you have a thread then you have a task structure as
    unswappable memory in kernel, a per-thread stack, which is reducing
    your virtual memory per process (you have only around 3GB of virtual
    memory per process in Linux x86 32bit).

    So one uses a process or thread pool to scale beyond that.
    Pool size is typically related to the amount of CPU cores in the system.


    Ingo Oeser

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-05-26 15:17    [W:0.019 / U:2.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site