www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <20051023124539.21428.qmail@web32008.mail.mud.yahoo.com> |
Date: | Sun, 23 Oct 2005 05:45:39 -0700 (PDT) |
From: | Johan De Taeye <johan_de_taeye AT yahoo DOT com> |
Subject: | Scalability problem with Pthread Read/Write Locks |
To: | cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
My multi-threaded application is creating a lot of pthread_rwlock objects to protect access to my objects. I am noticing that this doesn't scale up well. As the number of active objects being created/changed/deleted increases into the thousands, the runtime performance degrades very badly. When investigating the problem I noticed from the source code in the files winsup/cygwin/thread.h and winsup/cygwin/thread.cc that a static double-linked list (called rwlocks) is used to keep track of all rwlocks present in the process. Removal of an element in the list is O(n) and explains the behavior of my application. When compiling under Linux no such scalability problems are found. (I believe the pthreads implementation there doesn't need to keep track of the active rwlocks) Finally the question: Could/should the =list= data structure be replaced with a =set= to provide better scalability? Or, is my application design simply not right and is creating a large number of rwlocks not a wise choice? Regards, Johan __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |