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. |