401bcccc894aaa76a98bfc4bf04733641e8222cb
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 4"""
4  date="2021-10-05T19:26:49Z"
5  content="""
6 I've tried most types of heap profiles and saw only PINNED.
7 But a retainer profile (-hr) told more.
8
9 <img src="https://tmp.joeyh.name/prof.png">
10
11 Note that 8602 is really getImportableContents, and 14913 is importKeys.
12 (Found in git-annex.prof which tells the call stack for each set.) 
13
14 I think that buildImportTrees's allocation is due to needing to hash
15 git-annex symlinks and retain the shas. (mktreeitem) Unless there's also memory
16 fragmentation happening there.
17
18 treeItemsToTree might be the real problem, but it's hard to see how to 
19 improve it. Maybe stop using it and use a temporary index file to build
20 up the tree?
21
22 Notice that the 30mb spike shown in the profile is only a fraction of the
23 300+ mb that run actually grew to consume. Which gets back to PINNED and fragmentation,
24 I'm afraid..
25
26 Looking at git-annex from outside, I collected these RSS
27 values:
28
29         101508 early borg list
30         209704 before mktreeitem
31         261724 before treeItemsToTree
32         327260 after treeItemsToTree
33
34
35 """]]