"Cameron Kerr" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> In comp.os.linux.networking RosalieM <(E-Mail Removed)> wrote:
....
> Threads can offer better performance depending on what your server
> program is doing. Its preferable to use threads in the following
> scenarios
>
> * You need to share a lot of data between server children. You can't
> easily do this in a forked architecture.
If i get mmap memory or a shm file and put my data into it. All my processes
will share this data, i mean for reading or i must lock for writing, and
each new process knows that memory from his parent ?
> * The duration of the "connection" (TCP or UDP) is very short compared
> to the time taken to fork a new process. But you can have pre-forked
> servers which can lessen the need for threads.
How can i have a idea of what is done and time needed to switch to a new
thread, and compare with a new process made by forking and an old process
that became eligible ? What what is the impact of linux strategy copy on
demand for processes in this case?
> All in all, it's generally better not to use threads if you can avoid
> it, as you open yourself up to a lot of locking issues which complicate
> your code and make it harder to debug.
>
Thanks for this advices about threads and processes.
> > - Wonderful Kernel 2.6 documentation says that this kernel has some
> > changes made for tcp/ip and that it is big improvement for apache, and
> > this is reason why khttp is not needed anymore.
>
> That and nobody liked/used it, IIRC.
>
> Can you tell us in which file you got this information? Are you talking
> about pthreads or that new thread system that RedHat introduced in RH9
> (nptl or some such).
I can tell you, I found this information in "wonderful+linux" google search,
then search into with keyword "apache".
They spoke about "performance bottlenecks that prevented Apache ..." do you
know more ?
> > - Is there any sort of improvement in putting many ethernet nic on the
> > pci bus ?
>
> No, as they are all sharing the bandwidth of the PCI bus. But this is
> more of a concern when you use Gigabit ethernet.
>
For http server again, where could be the bottelnecks?
> --
> Cameron Kerr
> (E-Mail Removed) : http://nzgeeks.org/cameron/
> Empowered by Perl!
Bash, perl, php should be buried alive, the sooner the best ...
BR.