commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: [lang] System properties
Date Fri, 23 Aug 2002 13:56:09 GMT
> From: Juozas Baliuka [mailto:baliuka@mwm.lt] 
> 
> I believe it is possible to configure: 
> system.threadingStrategy=GoodStrategy
> 
>  possible it is very specific for OS, but I think it is 
> better to configure "strategy" not to detect it from OS name 
> and "Administrators Guide" is more usefull thing in this case.

BTW, the OS name is used to grab the attribute reader--which
then finds the necessary information for me.  Since it is different
for each platform.  I don't have a massive switch statement that
says "if I have platform XX assume YY number of processors".

> 
> ----- Original Message -----
> From: "Berin Loritsch" <bloritsch@apache.org>
> To: "'Jakarta Commons Developers List'" 
> <commons-dev@jakarta.apache.org>
> Sent: Friday, August 23, 2002 3:20 PM
> Subject: RE: [lang] System properties
> 
> 
> > > From: Juozas Baliuka [mailto:baliuka@mwm.lt]
> > >
> > > Hi,
> > > I do not like any kind of OS detection, I think it 
> useless. Things 
> > > must be configured, not detected from System properties 
> by OS name.
> > >
> > > Like "pool.maxThreads=40" and not this kind of crap:
> >
> > <snip/>
> >
> > > Doe's somebody knows "good" usage for OS_XXX ?
> >
> > For OS_XXX? no.  There are no good usages in *Java*.  There are a 
> > number of uses in C++, etc. where you may have to make 
> decisions based 
> > on the processor type or platform--i.e. enabling some optimizations 
> > that are specific to a platform. In Java, the best we can do is 
> > display a little bit of system information.
> >
> > What is the most useful bit of information is how many processors 
> > exist.  The clumsy way is to require the user to specify that in a 
> > property:
> >
> > system.numcpus=2
> >
> > And then later use that for threadpool sizing for an event based 
> > system.  You can choose to have more than one thread per 
> CPU, or you 
> > can have a set of threads that you just use.
> >
> > I honestly think the number of CPUs helps in the decision process, 
> > because the system can handle that many more threads.  The only 
> > problem is that there is no *currently* standard way of 
> grabbing that 
> > information.
> >
> > Win 9x can only support one processor
> > Win NT/2000/XP use environment variables
> > UNIX systems usually have support for the /proc filesystem
> >
> > Now, to reduce the number of "plug-ins" for the types of 
> platforms we 
> > can grab the number of CPUs from, the OS_XXX macros can 
> really help.  
> > Windows95, Windows98, WindowsME are all essentially the same plugin 
> > with a different name. Same with the WindowsNT, Windows2000, and 
> > WindowsXP plugins. The Linux plugin uses the /proc 
> filesystem--which 
> > all UNIX platforms should be able to support.
> >
> > Outside of that, there is no real benefit I can see.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:commons-dev-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message