Thread (28 messages) flat view 28 messages, 5 authors, 2022-09-07

RE: [External Mail]Re: Partial-clone cause big performance impact on server

From: 程洋 <hidden>
Date: 2022-08-17 10:22:34

But I still think the protocol still should tell the server which ref the blob is reachable.
Because it would be really hard to implement any kind of ACL
But git is surely designed for open sources community. It makes senses this request will be rejected.
-----Original Message-----
From: Derrick Stolee <redacted>
Sent: Monday, August 15, 2022 9:19 PM
To: Jeff King <redacted>; 程洋 <redacted>
Cc: git@vger.kernel.org; 何浩 <redacted>; Xin7 Ma 马鑫
[off-list ref]; 石奉兵 [off-list ref]; 凡军辉
[off-list ref]; 王汉基 [off-list ref]
Subject: [External Mail]Re: Partial-clone cause big performance impact on
server

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。

On 8/14/2022 2:48 AM, Jeff King wrote:
quoted
On Thu, Aug 11, 2022 at 08:09:56AM +0000, 程洋 wrote:
quoted
    4. And we then track our server(which is gerrit with jgit). We
       found the server is couting objects. Then we check those 40k
       objects, most of them are blobs rather than commit. (which
       means they're not in bitmap)
    5. We believe that's the root cause of our problem. Git sends too
       many "want SHA1" which are not in bitmap, cause the server to
       count objects  frequently, which then slow down the server.
I'd be surprised if bitmaps make a big difference either way here,
since blobs are very quick in the "counting" phase of pack-objects.
They can't link to anything else, so we should not be opening the
object contents at all! We just need to find them on disk, and then in
many cases we can send them over the wire without even decompressing
(the exception is if they are stored as deltas against an object the client
doesn't have).
quoted
I didn't generate a test case, but I'm pretty sure that is how
git.git's pack-objects should behave. But you mentioned that the
server is jgit; it's possible that it isn't as optimized in that area.
I just remembered that Gerrit specifically has branch-level security, where
some branches are not visible to all users. For that reason, blobs cannot be
served without first determining if they are reachable from a branch visible
to the current user.

I'm not sure if that's the problem in this particular case, but it could be.

Thanks,
-Stolee
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help