How many I can make threads per process ?

Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon

I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$1@inn.qnx.com>…

Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon

It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <Jay.Hogg@t-netix.com.r-e-m-o-v-e> wrote in message
news:9s7qml$cf6$1@inn.qnx.com

I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon

\

Well, they HAVE been advertising QNX 6 as being very scalable :slight_smile:

“Hoon Jung” <hjung@3ic.co.kr> wrote in message
news:9s8j8h$ru9$1@inn.qnx.com

It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon



\

Marty Doane <marty.doane@rapistan.com> wrote:

Well, they HAVE been advertising QNX 6 as being very scalable > :slight_smile:

Oh yeah, if you have 300 machines, you can spawn 1000 processes
per machine, and they still talk to each other, doesn’t that
scalable enough ? :slight_smile:

-xtang


“Hoon Jung” <> hjung@3ic.co.kr> > wrote in message
news:9s8j8h$ru9$> 1@inn.qnx.com> …
It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon



\

What hardware are you going to use to connect 300,000 serial ports?


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Hoon Jung” <hjung@3ic.co.kr> wrote in message
news:9s8j8h$ru9$1@inn.qnx.com

It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon



\

OK, Xiaodan. So is 1000 the current limit of processes per system?

Obviously this guy is trying to set up an ISP. His question make me think
of other things besides number of processes. Like how do you connect
300,000 serial ports, 300,000 modems, how big a power supply wouold you
need, how much memory would you need, and would your system EVER come out of
the ISR?


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:9s8sfc$jir$1@nntp.qnx.com

Marty Doane <> marty.doane@rapistan.com> > wrote:
Well, they HAVE been advertising QNX 6 as being very scalable > :slight_smile:

Oh yeah, if you have 300 machines, you can spawn 1000 processes
per machine, and they still talk to each other, doesn’t that
scalable enough ? > :slight_smile:

-xtang


“Hoon Jung” <> hjung@3ic.co.kr> > wrote in message
news:9s8j8h$ru9$> 1@inn.qnx.com> …
It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon





\

As I made the “scalable” comment, I had a picture in my mind of a large room
filled with a HUGE tangle of several hundred thousand cables. Buried in the
middle somewhere is this poor QNX 6 computer. :slight_smile:

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:9s92k5$8fh$1@inn.qnx.com

OK, Xiaodan. So is 1000 the current limit of processes per system?

Obviously this guy is trying to set up an ISP. His question make me think
of other things besides number of processes. Like how do you connect
300,000 serial ports, 300,000 modems, how big a power supply wouold you
need, how much memory would you need, and would your system EVER come out
of
the ISR?


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:9s8sfc$jir$> 1@nntp.qnx.com> …
Marty Doane <> marty.doane@rapistan.com> > wrote:
Well, they HAVE been advertising QNX 6 as being very scalable > :slight_smile:

Oh yeah, if you have 300 machines, you can spawn 1000 processes
per machine, and they still talk to each other, doesn’t that
scalable enough ? > :slight_smile:

-xtang


“Hoon Jung” <> hjung@3ic.co.kr> > wrote in message
news:9s8j8h$ru9$> 1@inn.qnx.com> …
It is my fault that I told you How many I can make threads per
process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want
to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon







\

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:9s923h$863$1@inn.qnx.com

What hardware are you going to use to connect 300,000 serial ports?

PPP session can go over ethernet (PPPoE)


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Hoon Jung” <> hjung@3ic.co.kr> > wrote in message
news:9s8j8h$ru9$> 1@inn.qnx.com> …
It is my fault that I told you How many I can make threads per process.
It’s not threads but process. How many I can make process.
I want to make 300,000 PPP(Point-to-Point Protocol) sessions.

Thanks in advance,
Hoon

“Jay Hogg” <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote in message
news:9s7qml$cf6$> 1@inn.qnx.com> …
I’ll bite…

Why do you think you need to start 300,000 threads?

Jay

Hoon Jung wrote in message <9s7i34$840$> 1@inn.qnx.com> >…
Hi,
How many I can make thread per process ?
The follwing is my code.

#include <stdio.h
#include <stdlib.h
#include <pthread.h

void* function( void* arg )
{
printf( “This is thread %d\n”, pthread_self() );
sleep(999);
return( 0 );
}

int main( void )
{
int i;

for (i = 0; i < 300000; i++)
pthread_create( NULL, NULL, &function, NULL );

sleep( 10 );
return EXIT_SUCCESS;
}

When I executed this code I could make 32768 threads, but I want to
make
300000.
Is it imposible that I make threads more than 32768 ?

Thanks,
Hoon





\

Bill Caroselli <qtps@earthlink.net> wrote:

OK, Xiaodan. So is 1000 the current limit of processes per system?

Heh, of cause not. I just pick an easy number.

So “what is the limit”? I am not really sure, but guessing sth
about 65535. Kernel gurus should correct me if I am wrong.

Obviously this guy is trying to set up an ISP. His question make me think
of other things besides number of processes. Like how do you connect
300,000 serial ports, 300,000 modems, how big a power supply wouold you
need, how much memory would you need, and would your system EVER come out of
the ISR?

Yeah, you probably hit hardware limitation first, that’s why I don’t
think “within one machine” is the solution.

-xtang

I made a call simulator(CDMA 2000-1x) in Linux box… so I wanna ‘porting’
this simulator into QNX 6.
Up to now this simulator supports 2,000 calls, that is, this simulator
executes 2,000 ppp process.
2,000 calls is so small that I want to extend to 300,000 calls…That is why
I’m going to make 300,000 process.

Thanks in advance,
Hoon

“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:9s9ule$ak8$1@nntp.qnx.com

Bill Caroselli <> qtps@earthlink.net> > wrote:
OK, Xiaodan. So is 1000 the current limit of processes per system?

Heh, of cause not. I just pick an easy number.

So “what is the limit”? I am not really sure, but guessing sth
about 65535. Kernel gurus should correct me if I am wrong.

Obviously this guy is trying to set up an ISP. His question make me
think
of other things besides number of processes. Like how do you connect
300,000 serial ports, 300,000 modems, how big a power supply wouold you
need, how much memory would you need, and would your system EVER come
out of
the ISR?

Yeah, you probably hit hardware limitation first, that’s why I don’t
think “within one machine” is the solution.

-xtang

Hi Hoon…

I wonder if you could let every one know how your simulation goes?

Regards…

Miguel.

Hoon Jung wrote:

I made a call simulator(CDMA 2000-1x) in Linux box… so I wanna ‘porting’
this simulator into QNX 6.
Up to now this simulator supports 2,000 calls, that is, this simulator
executes 2,000 ppp process.
2,000 calls is so small that I want to extend to 300,000 calls…That is why
I’m going to make 300,000 process.

Thanks in advance,
Hoon