Skip to content

Conversation

@zhouzhuojie
Copy link
Contributor

@zhouzhuojie zhouzhuojie commented Jul 2, 2021

Stack from ghstack:

Some related docs about submodule.fetchJobs
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs

time git submodule update --init --recursive 
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
time git submodule update --init --recursive --jobs 4  
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
time git submodule update --init --recursive --jobs 8 
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 2, 2021

💊 CI failures summary and remediations

As of commit 33a641c (more details on the Dr. CI page and at hud.pytorch.org/pr/61152):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


Preview docs built from this PR

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

zhouzhuojie added a commit that referenced this pull request Jul 2, 2021
ghstack-source-id: 01c2f8a
Pull Request resolved: #61152

```
time git submodule update --init --recursive --jobs 4  
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```


```
time git submodule update --init --recursive 
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```

[ghstack-poisoned]
zhouzhuojie added a commit that referenced this pull request Jul 2, 2021
ghstack-source-id: 4c9fc5a
Pull Request resolved: #61152
@zhouzhuojie zhouzhuojie requested a review from a team July 2, 2021 00:21
Copy link
Contributor

@driazati driazati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (it'd be nice if we could do the same thing for our actions checkout too but it'd require waiting for this or forking our own: actions/checkout#323). Looks like support for this was added in 2016 which is plenty of lead time for us to be requiring it imo.

We could even be more aggressive since submodule updates aren't really CPU blocking, they're probably just yielding a bunch since they're waiting for the network (i'm just guessing here), but maybe we could dial this up to 10 or something?

@zhouzhuojie
Copy link
Contributor Author

Looks good (it'd be nice if we could do the same thing for our actions checkout too but it'd require waiting for this or forking our own: actions/checkout#323). Looks like support for this was added in 2016 which is plenty of lead time for us to be requiring it imo.

We could even be more aggressive since submodule updates aren't really CPU blocking, they're probably just yielding a bunch since they're waiting for the network (i'm just guessing here), but maybe we could dial this up to 10 or something?

good point! seems that --jobs 0 is even better. from their doc


Some related docs about `submodule.fetchJobs`
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs



```
time git submodule update --init --recursive 
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```


```
time git submodule update --init --recursive --jobs 4  
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```


```
time git submodule update --init --recursive --jobs 8 
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

```

```
time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

```

[ghstack-poisoned]
@zhouzhuojie zhouzhuojie changed the title Add --jobs 4 for git submodule update Add --jobs 0 for git submodule update Jul 2, 2021
@seemethere
Copy link
Member

Looks good (it'd be nice if we could do the same thing for our actions checkout too but it'd require waiting for this or forking our own: actions/checkout#323). Looks like support for this was added in 2016 which is plenty of lead time for us to be requiring it imo.

We could even be more aggressive since submodule updates aren't really CPU blocking, they're probably just yielding a bunch since they're waiting for the network (i'm just guessing here), but maybe we could dial this up to 10 or something?

If there’s a big performance gain we can just stop pulling submodules using actions/checkout and pull them in a separate step


Some related docs about `submodule.fetchJobs`
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs



```
time git submodule update --init --recursive 
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```


```
time git submodule update --init --recursive --jobs 4  
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```


```
time git submodule update --init --recursive --jobs 8 
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

```

```
time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

```

[ghstack-poisoned]
zhouzhuojie added a commit that referenced this pull request Jul 2, 2021
ghstack-source-id: a0b5e05
Pull Request resolved: #61152
@zhouzhuojie
Copy link
Contributor Author

Looks good (it'd be nice if we could do the same thing for our actions checkout too but it'd require waiting for this or forking our own: actions/checkout#323). Looks like support for this was added in 2016 which is plenty of lead time for us to be requiring it imo.
We could even be more aggressive since submodule updates aren't really CPU blocking, they're probably just yielding a bunch since they're waiting for the network (i'm just guessing here), but maybe we could dial this up to 10 or something?

If there’s a big performance gain we can just stop pulling submodules using actions/checkout and pull them in a separate step

the action checkout is pretty fast, only 5s

image

@zhouzhuojie
Copy link
Contributor Author

close in favor of #61311

@zhouzhuojie zhouzhuojie closed this Jul 6, 2021
zhouzhuojie added a commit to zhouzhuojie/pytorch that referenced this pull request Jul 7, 2021
Summary:
Pull Request resolved: pytorch#61311

Pull Request resolved: pytorch#61152

Some related docs about `submodule.fetchJobs`
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs

```
time git submodule update --init --recursive
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```

```
time git submodule update --init --recursive --jobs 4
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```

```
time git submodule update --init --recursive --jobs 8
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

```

```
time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

```

Test Plan: Imported from OSS

Reviewed By: 1ntEgr8

Differential Revision: D29560875

Pulled By: zhouzhuojie

fbshipit-source-id: 60180e7b8478a04e1df777f6f20a0590df8959c5
facebook-github-bot pushed a commit that referenced this pull request Jul 7, 2021
Summary:
Pull Request resolved: #61311

Pull Request resolved: #61152

Some related docs about `submodule.fetchJobs`
https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulefetchJobs

```
time git submodule update --init --recursive
________________________________________________________
Executed in  243.20 secs    fish           external
   usr time   49.64 secs  213.00 micros   49.64 secs
   sys time   29.27 secs  795.00 micros   29.27 secs
```

```
time git submodule update --init --recursive --jobs 4
________________________________________________________
Executed in  143.04 secs    fish           external
   usr time   51.06 secs  246.00 micros   51.06 secs
   sys time   30.96 secs  742.00 micros   30.96 secs
```

```
time git submodule update --init --recursive --jobs 8
________________________________________________________
Executed in  124.64 secs    fish           external
   usr time   51.76 secs  264.00 micros   51.76 secs
   sys time   30.49 secs  739.00 micros   30.49 secs

```

```
time git submodule update --init --recursive --jobs 0 # use all online cpus
 ________________________________________________________
Executed in  129.75 secs    fish           external
   usr time   51.64 secs  181.00 micros   51.64 secs
   sys time   31.49 secs  781.00 micros   31.49 secs

```

Test Plan: Imported from OSS

Reviewed By: 1ntEgr8

Differential Revision: D29560875

Pulled By: zhouzhuojie

fbshipit-source-id: 556027dffe744c66428075a8a1bf64683930aaaf
@facebook-github-bot facebook-github-bot deleted the gh/zhouzhuojie/1/head branch August 6, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants