git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Better value for chunk_size when threaded

From
Nicolas Pitre <nico@cam.org>
Date
Dec 10, 2007, 13:46 UTC
Message-ID
<alpine.LFD.0.99999.0712100843530.555@xanadu.home>
In-Reply-To
<475D1473.5090809@op5.se>
On Mon, 10 Dec 2007, Andreas Ericsson wrote:
Show 38 quoted lines
> Nicolas Pitre wrote:
> > If there is one besides futzing with /proc/cpuinfo I'd like to know about
> > it.  Bonus points if it is portable.
> > 
> 
> Here is such a one. I've sent it before, using git-send-email, but that
> one doesn't seem to work too well for all list-members, probably because
> my own laptop appears to be the original SMTP-server and its name can't
> be looked up. Sorry for inlining it here instead of sending it as a mail
> on its own, but I have absolutely no idea how to get git-send-email to
> do ldap authentication and connect to our tls-enabled smtp-server
> without using /usr/bin/sendmail and adding my laptop as originating
> smtp-server.
> 
> This patch replaces the one I sent earlier and *should* work on
> everything from Irix and AIX to Linux, Windows and every other
> posixish system. It passes all tests, both with and without
> THREADED_DELTA_SEARCH, and causes our weekly repack of our
> mother-ship repos to run roughly 4 times as fast (4 cores, no
> previous thread config).
> 
> Extract with
>   sed -n -e /^##SEDMEHERE##/,/##TOHERE##/p -e /^##/d
> 
> ##SEDMEHERE##
> > From ddf08303bd7962be385abbd5e964455a90ed6055 Mon Sep 17 00:00:00 2001
> From: Andreas Ericsson <ae@op5.se>
> Date: Thu, 6 Dec 2007 22:09:27 +0100
> Subject: [PATCH] pack-objects: Add runtime detection of number of CPU's
> 
> Packing objects can be done in parallell nowadays, but
> it's only done if the config option pack.threads is set
> to a value above 1. Because of that, the code-path used
> is sometimes not the most optimal one.
> 
> This patch adds a routine to detect the number of active
> CPU's at runtime, which should provide a better default
> and activate the (hopefully) better codepath more often.
Your patch is whitespace dammaged.

Also please make it into a separate .c file. One day, maybe index-pack will want to use it as well.

Nicolas
Previous: Andreas EricssonNext: Andreas Ericsson
Message 6 of 7 in “Better value for chunk_size when threaded”
  1. Jon SmirlDec 6, 2007
  2. Nicolas PitreDec 7, 2007
  3. Jon SmirlDec 7, 2007
  4. Nicolas PitreDec 7, 2007
  5. Andreas EricssonDec 10, 2007
  6. Nicolas PitreDec 10, 2007
  7. Andreas EricssonDec 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.