Skip to content

Move to requiring go1.7 #3093

Closed
Closed

Description

@whyrusleeping

go1.7 brings many awesome improvements that we benefit greatly from.

Some highlights:

at least 10% (up to 35%) performance improvement in crypto/sha256 and math/big

These are hard cpu bottlenecks in various aspects of ipfs. Improving these will make ipfs feel faster all over (especially during ipfs add on faster disks). It will also make ipfs use less cpu in general.

context adopted into stdlib

the context is a very core component to how we write good concurrent code. Having this in the standard library will clean up our dependency tree quite a bit, as well as making it easier to write better concurrent code all around. Our dependencies will also be more likely to integrate contexts into their code (looking at you yamux!).

net.DialContext

This one is huge. We currently have lots of issues down the network stack with different blocking calls not respecting contexts, it leads to things not feeling very responsive, and consuming wayyy more resources than they need to. In this particular instance, for dialing, we make N (around 10) concurrent outbound dials per peer we try to connect to, one for each address we know they might be reachable at. If we dial an incorrect address, the only way currently to end that is to wait for the timeout. Even if another dial succeeds, that dial has to block until it times out, holding open a file descriptor all the while. Having that call respect contexts will greatly improve our file descriptor consumption.

So what do we need to do?

Using the context changes will be backwards incompatible with previous versions of go. When we decide to implement these, anyone wanting to compile ipfs from source will have to use go1.7

Since we provide pre-built binaries, i think its acceptable to quickly set this as a build requirement. What do you all think?

Relevant PRs:

Activity

  1. whyrusleeping commented on Aug 17, 2016

    @whyrusleeping
    MemberAuthor

    Also worth noting, in order to support macOS Sierra, we need to use go1.7

  2. Kubuxu commented on Aug 17, 2016

    @Kubuxu
    Member

    I am all for it, but we should then publish dev releases to dist page periodically, as some systems will take few weeks or months to adopt 1.7 compiler.

  3. jbenet commented on Aug 18, 2016

    @jbenet
    Member
    • it's fine to bump our req to 1.7
    • we should strongly consider using gx to install the version of Go we need
      locally. Can use their prebuilts directly. That way we can upgrade without
      waiting for people to upgrade their whole systems.
    • most users SHOULD NOT be building from source anyway, nor expecting to
      use edge dev, they SHOULD be using releases.
      On Wed, Aug 17, 2016 at 12:15 Jakub Sztandera notifications@github.com
      wrote:

    I am all for it, but we should then publish dev releases to dist page
    periodically, as some systems will take few weeks or months to adopt 1.7
    compiler.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #3093 (comment), or mute
    the thread
    https://github.com/notifications/unsubscribe-auth/AAIcoViP1yI6BrVOE3_dZYLIVlY-0vUaks5qgzOZgaJpZM4JmENv
    .

  4. jbenet commented on Aug 18, 2016

    @jbenet
    Member

    Also much ❤️❤️❤️❤️❤️❤️❤️❤️ to net with context :)
    On Wed, Aug 17, 2016 at 23:16 Juan Benet juan2@benet.ai wrote:

    • it's fine to bump our req to 1.7
    • we should strongly consider using gx to install the version of Go we
      need locally. Can use their prebuilts directly. That way we can upgrade
      without waiting for people to upgrade their whole systems.
    • most users SHOULD NOT be building from source anyway, nor expecting to
      use edge dev, they SHOULD be using releases.
      On Wed, Aug 17, 2016 at 12:15 Jakub Sztandera notifications@github.com
      wrote:

    I am all for it, but we should then publish dev releases to dist page
    periodically, as some systems will take few weeks or months to adopt 1.7
    compiler.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #3093 (comment), or mute
    the thread
    https://github.com/notifications/unsubscribe-auth/AAIcoViP1yI6BrVOE3_dZYLIVlY-0vUaks5qgzOZgaJpZM4JmENv
    .

  5. whyrusleeping commented on Sep 14, 2016

    @whyrusleeping
    MemberAuthor

    go1.7 is now required for building master of ipfs. We can close this now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions