Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure POSIX resource limits using ulimit #2

Merged
merged 2 commits into from
Jun 24, 2014

Conversation

AlainODea
Copy link
Contributor

This amounts to removing the explicit handling since the resource limits
already work if provided by the system.

I believe this draws the correct boundary since I don't believe it is
appropriate for the builder-client to set its own resource limits.

@AlainODea
Copy link
Contributor Author

I have tested this for the past several weeks on my SmartOS builders and seen no direct ill effects. The most obvious side-effect this would have is not preventing runaway memory usage. I have the boundaries of my zones and ulimit in place for that.

@AlainODea
Copy link
Contributor Author

In practice the 1GB memory limit causes out of memory failures on 64-bit builds of GHC 7.8+. This makes the limit problematic. I considered making it configurable and then realized it is configurable via ulimit so there is no need.

@cartazio
Copy link
Contributor

shouldn't there be some large but finite baked in limit still? Wouldn't eg a 10gb limit be a good "prevent explosions" limit that is far more than is needed for a ghc build (even in a 40core system?) but still some notion of limits?

@AlainODea
Copy link
Contributor Author

I'm going to add some explanation of ulimit to the README so people can easily constrain how far the builder can go.

@pgj
Copy link
Contributor

pgj commented Jun 19, 2014

Wouldn't eg a 10gb limit be a good "prevent explosions" limit that is far more than is needed for a ghc build (even in a 40core system?) but still some notion of limits?

Alain's solution can do the same -- it is just not handled by builder-client but ulimit(1), basically in a more modular way.

I'm going to add some explanation of ulimit to the README so people can easily constrain how far the builder can go.

Sounds good to me.

This amounts to removing the explicit handling since the resource limits
already work if provided by the system.

I believe this draws the correct boundary since I don't believe it is
appropriate for the builder-client to set its own resource limits.
@AlainODea
Copy link
Contributor Author

Okay documentation provided. I also put in a reference to Windows System Resource Manager since we likely want builders on Windows at some point soon.

@cartazio
Copy link
Contributor

anything else needed to merge it in?

Q: should we consider hackagifying it at some point?

@AlainODea
Copy link
Contributor Author

I think it's all good for merge.

A: I like the idea of putting it on Hackage. We need a backlog of gaps between us and that eventuality so I can start filling them.

cartazio added a commit that referenced this pull request Jun 24, 2014
Configure POSIX resource limits using ulimit
@cartazio cartazio merged commit a70c73a into haskell:master Jun 24, 2014
@AlainODea AlainODea deleted the ImpliedResourceLimits branch June 24, 2014 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants