From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: HOWTO: lightning fast Emacs on Linux multicore Date: Sun, 16 Nov 2014 14:39:40 -0700 Message-ID: <20141116142736830858969@bob.proulx.com> References: <871tpdl29g.fsf@debian.uxu> <87sihin9h1.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1416174008 14575 80.91.229.3 (16 Nov 2014 21:40:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2014 21:40:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 16 22:40:02 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xq7Y9-0007ft-UO for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Nov 2014 22:40:02 +0100 Original-Received: from localhost ([::1]:45157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq7Y9-0001ww-BE for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Nov 2014 16:40:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq7Xu-0001wf-QX for help-gnu-emacs@gnu.org; Sun, 16 Nov 2014 16:39:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xq7Xq-0003jJ-Cs for help-gnu-emacs@gnu.org; Sun, 16 Nov 2014 16:39:46 -0500 Original-Received: from joseki.proulx.com ([216.17.153.58]:59967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq7Xq-0003jF-4b for help-gnu-emacs@gnu.org; Sun, 16 Nov 2014 16:39:42 -0500 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 22D5521229 for ; Sun, 16 Nov 2014 14:39:41 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id E989E2DC3A; Sun, 16 Nov 2014 14:39:40 -0700 (MST) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87sihin9h1.fsf@debian.uxu> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100973 Archived-At: Emanuel Berg wrote: > Bob Proulx writes: > > A tool I like a lot for visualizing this is the bar > > graphs in 'htop'. You might try it. I expect you > > will see that during normal operation all cpus are > > going to get processes. > > Yes, htop(1) is great, only the colors (light cyan and > green) I don't like. That sounds like you want to turn off colors. There is always 'export TERM=vt100' to disable terminal colors everywhere if you like. :-) But I know we just chatted about sources.list where you want syntax coloring. So is this simply another case where you want color but you want a different color theme? I assume it is possible to set different colors for htop. I have never bothered to look. > Here is a screenshot of htop and top(1) together: > http://user.it.uu.se/~embe8573/dumps/tops.png > Can you see anything interesting? I see that both cpus are getting work. Other than that not really. The load is so low at 0.2 that there isn't enough going on to be interestingly resource stressful. Just as a general statement other useful tools are iotop and nettop too. > > You didn't say what type of cpu you have but let me > > say a word about Intel Hyper-Threading > > (https://en.wikipedia.org/wiki/Hyper-threading) in > > That was a lot to digest :) I'll read that Wikipedia > article later and see if that clarifies things. > > My CPU is, according to lscpu(1): > Model name: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ You have a true dual-core. Not hyperthreaded. So you can ignore all of the discussion about hyperthreading. Which is good actually. > Indeed, thats how it works in general. However, I do > web browsing, mail, Usenet, all programming including > compilation, actually I do everything in Emacs by now. > So I think it makes sense for the system to not strive > for general performance, but for special-treatment of > the number one process. Anyway that's the reasoning > behind this method, if it holds, let's just say it is > complicated and difficult to quantify. It feels faster > is all I know for sure. But even when working almost entirely within emacs the emacs process itself will depending upon what you are doing eventually spawn children processes. I would want all of those to be able to make use of both cpu cores. Locking it all down to one cpu would be slower for me. You say you do compilation within emacs. Does this mean that emacs is sharing the single locked core with the compilation process too? That would be a prime example where I would want emacs and any make -j2 parallel compilation to share the cpu. Locking all of that to one cpu would definitely be worse there. Bob