Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 87023 invoked by uid 500); 15 Sep 2001 03:14:59 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 87012 invoked from network); 15 Sep 2001 03:14:58 -0000 Message-ID: <3BA2C7F3.9010004@cnet.com> Date: Fri, 14 Sep 2001 20:16:03 -0700 From: Ian Holsman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4+) Gecko/20010912 X-Accept-Language: en-us MIME-Version: 1.0 To: Ian Holsman CC: Aaron Bannert , dev@apr.apache.org Subject: Re: [proposal] apr_thread_setconcurrency() References: <20010914154448.V11014@clove.org> <3BA2BD23.8060004@cnet.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ian Holsman wrote: > Aaron Bannert wrote: > >> I'd like to propose we add a call that gives a hint to the OS as to >> the level of concurrency we wish to have. This would mirror >> pthread_setconcurrency(), and would be a simple call to that on >> operating systems that have it available. On other platforms it >> would be simple noop. >> >> Give me some +1s and I'll submit a patch. >> >> -aaron >> > > +1 IF the number you set it to is a hint, and solaris can changes the > concurrency afterwards according to the load on the system/internal > guidelines. > > Oh... > I ran the the testlockperf code on the 8-way box, with > the pthread_setconcurrency calls commented out, and with > the concurrency calls put in (setting them to 8). > results are as follows > > (without setconcurrency) > APR Lock Performance Test > ============== > > apr_lock(INTRAPROCESS, MUTEX) Lock Tests > Initializing the apr_lock_t OK > Starting all the threads OK > microseconds: 9373710 usec > apr_thread_mutex_t Tests > Initializing the apr_thread_mutex_t OK > Starting all the threads OK > microseconds: 7304314 usec > apr_lock(INTRAPROCESS, READWRITE) Lock Tests > Initializing the apr_lock_t OK > microseconds: 11247506 usec > apr_thread_mutex_t Tests > Initializing the apr_thread_mutex_t OK > > microseconds: 8148914 usec > > (with pthread_setconcurrency(8) where you put the comments) > APR Lock Performance Test > ============== > > apr_lock(INTRAPROCESS, MUTEX) Lock Tests > Initializing the apr_lock_t OK > Starting all the threads OK > microseconds: 20054346 usec > apr_thread_mutex_t Tests > Initializing the apr_thread_mutex_t OK > Starting all the threads OK > microseconds: 16979410 usec > apr_lock(INTRAPROCESS, READWRITE) Lock Tests > Initializing the apr_lock_t OK > microseconds: 247538114 usec apr_thread_mutex_t Tests Initializing the apr_thread_mutex_t OK microseconds: 250328270 usec (I didn't wait long enough) > --It just sits at this point.... > (CVS Code is a couple of day old if that makes a difference)