Re: Developing Proxy Server - Don't have enough speed

From: David Schwartz (davids_at_webmaster.com)
Date: 05/06/03


Date: Tue, 6 May 2003 12:56:09 -0700


"Jignesh" <tosc8@yahoo.co.in> wrote in message
news:a4f50e86.0305060414.770b4cd1@posting.google.com...

> int main(int argc, char *argv[])
> {
> pthread_t t_outgoing,t_incoming;
> pthread_attr_t a_thread_attribute;
> pthread_create(&t_outgoing,NULL,(void *)&main_outgoing,NULL);
> pthread_create(&t_incoming,NULL,(void *)&main_incoming,NULL);
> pthread_join(t_outgoing,NULL);
> pthread_join(t_incoming,NULL);
> return 0;
> }

    I bet most of your problem is FreeBSD's default threading library,
libc_r. If you go to /usr/ports/devel/linuxthreads (I think), you'll find
the FreeBSD port of the LinuxThreads library. Compile/install that. Then
compile your code using it. I think you'll find that gives you comparable
performance to what you had on Linux.

    DS