Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Delays while building Libre Office.
Date: Sat, 04 May 2013 07:43:27
Message-Id: 6180F9CD-6BF7-4D61-803B-E5471C99D20C@stellar.eclipse.co.uk
In Reply to: [gentoo-user] Delays while building Libre Office. by Alan Mackenzie
1 On 2 May 2013, at 17:27, Alan Mackenzie wrote:
2 > ...
3 > Watching the build, it became evident that the first 50 minutes or so
4 > was taken up by several hundred mkdir operations (more precisely, mkdir
5 > -p <long path>). Some of these mkdir's would take, perhaps, a minute to
6 > execute. All the while, top showed make taking 100% of one core.
7
8 I think that at least you need to write a short shell script in which $i, $j, $k & $l each number 0 - 9, and which you create 1000 or 100,000 directories in the format /1/2/3/4/5 (or /a/b/c/d/e/).
9
10 I'm not sure if it's equally good to record the number of seconds since the epoc into a variable as the script launches as it i to just run the `time` command.
11
12 The former would allow you to calculate how long it's taken to create a directory (or 100 of them). You can compare how long it takes to delete directories and how long it takes to create and delete empty files (or files containing a single character).
13
14 I think you need to run this script on all your filesystems, and compare the results when emerge is and isn't running.
15
16 Ideally you'd hope to be able to reproduce this slow directory creation behaviour using only your shell script.
17
18 I think it's really easy to create such a shell script as this and to compare the results. I appreciate that adding complexities to it might be a chore, but it might be that you can reproduce the behaviour simply by creating 1000 directories with a single bash loop. I think it's pretty important to rule that out before assuming that the problem is with portage.
19
20 Stroller.