Bug 334094 - [server] Git File Store performance is poor
Summary: [server] Git File Store performance is poor
Status: RESOLVED INVALID
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on: 335705 335713 336116
Blocks:
  Show dependency tree
 
Reported: 2011-01-12 08:35 EST by Tomasz Zarna CLA
Modified: 2011-08-30 10:20 EDT (History)
2 users (show)

See Also:


Attachments
Patch v01 (8.97 KB, patch)
2011-01-12 08:43 EST, Tomasz Zarna CLA
no flags Details | Diff
Patch v02 (12.66 KB, patch)
2011-01-12 08:44 EST, Tomasz Zarna CLA
no flags Details | Diff
Another fix (77.03 KB, patch)
2011-01-19 11:19 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (226.42 KB, application/octet-stream)
2011-01-19 11:19 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-01-12 08:35:47 EST
When linking with a project from github.com I sometimes get a timeout exception because the file store for git are so slow on the server. Need to figure out how to improve this. A way to measure all stuff going on in the server would be nice too.
Comment 1 Tomasz Zarna CLA 2011-01-12 08:36:49 EST
JohnA: One of the reasons it is slow is that it goes back to the remote git server too often. For example on each call to fetchInfo() it does a git pull for that file. How this should behave really depends on the workflow. If the user knows they are the only author of the remote repository, then we can just always use the local cache on the Eclipse Web server. If there are other users or clients pushing to the same github, then we need to be able to synchronize with them.
Comment 2 Tomasz Zarna CLA 2011-01-12 08:42:15 EST
JohnA: One small step that comes to mind: Within a single GET, we should be able to satisfy it with a single request to the git repository. For example if I GET on a directory today, it appears to perform a separate git pull for each member of that directory. If it could do a single recursive pull on the directory rather than on each child, it would ensure there is at most one round trip to the git server for each round trip between browser and EW server.
Comment 3 Tomasz Zarna CLA 2011-01-12 08:43:43 EST
Created attachment 186625 [details]
Patch v01

I'm attaching a patch: a performance test for the most common operations for git file store. I hope it will serve as a reference point. I will now implement what John suggested in comment 2 and see if the test will indicate any improvement. Of course, John's idea makes totally sense to me, I would like to see if the perf. test is any good :)
Comment 4 Tomasz Zarna CLA 2011-01-12 08:44:15 EST
Created attachment 186626 [details]
Patch v02

Another patch: this one adds a new performance test which manipulates the workspace with HTTP requests, so any perf. improvement in o.e.e4.webide.server.servlets should be noticed. Speaking of which, the patch also modifies the way DirectoryHandlerV1 list directory children and makes GitFileStore aware of the EFS.CACHE flag. These simple changes resulted in a noticeable perf gain (-15% in CPU time, -28% in elapsed process).
Comment 5 Tomasz Zarna CLA 2011-01-18 09:48:16 EST
I ran the test from Patch v01 for both git filestore and local file system. The results are devastating, git fs is over 100x slower then local fs (see bug 334285, comment 1).
Comment 6 Tomasz Zarna CLA 2011-01-19 11:19:30 EST
Created attachment 187124 [details]
Another fix

This fix gives ca 7% improvement when setting file contents. This operation turned out to be a hot spot, but no surprise here: after setting a new content git add, commit, pull and push are called.

The patch contains some extra tests as well.

Another possible fix here could be to divide pull into fetch and merge, and do the later only if fetch (for the current branch) resulted in any changes being available.
Comment 7 Tomasz Zarna CLA 2011-01-19 11:19:36 EST
Created attachment 187125 [details]
mylyn/context/zip
Comment 8 Tomasz Zarna CLA 2011-03-01 05:24:19 EST
This should be no longer an issue once git client (bug 336116) and git REST API are in place.
Comment 9 Szymon Brandys CLA 2011-03-30 09:54:23 EDT
GitFileStore is no more part of the Orion server.