From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965426AbbD0UhZ (ORCPT ); Mon, 27 Apr 2015 16:37:25 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59115 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965114AbbD0UhV (ORCPT ); Mon, 27 Apr 2015 16:37:21 -0400 Date: Mon, 27 Apr 2015 22:37:18 +0200 From: Pavel Machek To: Pengfei Yuan <0xcoolypf@gmail.com> Cc: linux-kernel@vger.kernel.org Subject: Re: Why not build kernel with -O3 Message-ID: <20150427203718.GG29351@xo-6d-61-c0.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > I have conducted some experiments to compare kernels built with -O2 > and -O3. Here are the results: > > Application Performance O2 Performance O3 Improvement > Apache 127814.14 req/s 130321.24 req/s 1.96% > Nginx 537589.08 req/s 556723.32 req/s 3.56% > MySQL 70661.38 tx/s 71008.47 tx/s 0.49% > PostgreSQL 79763.39 tx/s 79535.59 tx/s -0.29% > Redis 352547.47 op/s 405417.24 op/s 15.0% > Memcached 844439.14 op/s 845321.79 op/s 0.10% > > Geomean: +3.34% > > Experiment environment: Linux 3.19.3, GCC 4.9.3 prerelease, Core-i7 > 4770, 32G RAM, 10GbE > > LMbench microbenchmark also shows reduction in various latencies, as > well as increase of throughputs. What is the size difference with -O3? Do you have mostly-userspace benchmark? (kernel build?) -O3 could hurt there if it produces bigger code.. Pavel -- (english) http://www.livejournal.com/~pavelmachek cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html