Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755590AbbDOVPm (ORCPT ); Wed, 15 Apr 2015 17:15:42 -0400 Received: from g2t2352.austin.hp.com ([15.217.128.51]:44832 "EHLO g2t2352.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754456AbbDOVPh (ORCPT ); Wed, 15 Apr 2015 17:15:37 -0400 Message-ID: <1429132533.7039.156.camel@j-VirtualBox> Subject: Re: [PATCH 2/3] sched, timer: Use atomics for thread_group_cputimer to improve scalability From: Jason Low To: Davidlohr Bueso Cc: Linus Torvalds , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Andrew Morton , Oleg Nesterov , Mike Galbraith , Frederic Weisbecker , Mel Gorman , Steven Rostedt , Preeti U Murthy , hideaki.kimura@hp.com, Aswin Chandramouleeswaran , Scott J Norton , jason.low2@hp.com Date: Wed, 15 Apr 2015 14:15:33 -0700 In-Reply-To: <1429107823.6795.18.camel@stgolabs.net> References: <1429052986-9420-1-git-send-email-jason.low2@hp.com> <1429052986-9420-3-git-send-email-jason.low2@hp.com> <1429107823.6795.18.camel@stgolabs.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1410 Lines: 27 On Wed, 2015-04-15 at 07:23 -0700, Davidlohr Bueso wrote: > On Tue, 2015-04-14 at 16:09 -0700, Jason Low wrote: > > While running a database workload, we found a scalability issue with itimers. > > > > Much of the problem was caused by the thread_group_cputimer spinlock. > > Each time we account for group system/user time, we need to obtain a > > thread_group_cputimer's spinlock to update the timers. On larger systems > > (such as a 16 socket machine), this caused more than 30% of total time > > spent trying to obtain this kernel lock to update these group timer stats. > > > > This patch converts the timers to 64 bit atomic variables and use > > atomic add to update them without a lock. With this patch, the percent > > of total time spent updating thread group cputimer timers was reduced > > from 30% down to less than 1%. > > What does 30% less time spent dealing with the thread_group_cputimer's > spinlock buy us? iow, does this help DB benchmark throughput or such? Yes, this also helps increase throughput since the scalability issue causes a performance degradation in the database workload. I currently don't have the exact numbers though. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/