List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:February 20 2004 7:41pm
Subject:Re: Does thread_concurrency do anything on a non-Solaris OS?
View as plain text  
In the last episode (Feb 20), Bill Marrs said:
> Looking around in the docs, I found this regarding thread_concurrency:
> thread_concurrency
> On Solaris, mysqld will call thr_setconcurrency() with this value. 
> thr_setconcurrency() permits the application to give the threads
> system a hint for the desired number of threads that should be run at
> the same time.
> I had noticed that it is set to 10 on my system, though I only have 2
> CPUs (I've also seen that the recommended value is #CPUS*2.  So, I
> was considering dropping it to 4.  But, after reading the above, I
> wonder if it makes difference on a Linux system (or any other
> non-Solaris system).

thr_setconcurrency is an obsolete Solaris-only function. 
pthread_setconcurrency is the replacement.  This means that mysql can
only set concurrency on Solaris, and according to my reading of the
manpage on Solaris 9, the value passed to the thr_ version is ignored. ( thr_ ) ( pthread_ )

According to the glibc 2.3.2 documentation:

  pthread_setconcurrency is unused in LinuxThreads due to the lack of a
  mapping of user threads to kernel threads.  It exists for source

It is supported to some degree on Tru64, AIX, and FreeBSD 5.x (with
libkse).  I don't know how much difference it makes to mysql.

	Dan Nelson
Does thread_concurrency do anything on a non-Solaris OS?Bill Marrs20 Feb
  • Re: Does thread_concurrency do anything on a non-Solaris OS?Dan Nelson20 Feb