Hacker News new | ask | show | jobs
by badrequest 2411 days ago
Prerequisites: CPUs: Two or more virtual CPUs RAM: 4GB or more

Why does a container registry need so many resources?

4 comments

First, this prereqs are about what you could get on a netbook in 2012 and on a modern day cell phone.

Second, I think it would help to know why you think a container registry wouldn't need a moderate amount of resources.

I don't necessarily disagree that the resources could be lower at the minimum (and in fact, I recall they are quite a bit lower than this when running it on your laptop without any load), but is this really anything unexpected?

It's written in Python so it's not going to be as efficient as Go or C++ but it certainly isn't Java levels of resources being requested here.

> First, this prereqs are about what you could get on a netbook in 2012 and on a modern day cell phone.

High resource requirements mean that I need to spend more on compute, whether that means paying a cloud provider for a beefier instance, or spending more money on hardware and electricity.

2C/4G is hardly "beefy". If that is too much to run then use the quay.io service and not worry about self hosting your registry?
"640 kB ought to be enough for anybody"

(yes, that was in reference to a PC, not a server.)

>about what you could get on a netbook in 2012 and on a modern day cell phone.

Spinning up a cloud VM with 4GB for a year is a bit more than beer money though.

Reminds me of installing gitlab. Requirement 8GB...for a basic install. After a bunch of crashes (on a 8gb VM) I went with vanilla git.

4gb from linode is $20/month. Not bad if you can actually get use.

If you want to just test it, why not use a VritualBox VM or similar?

Without getting all SJW on you I think it's important to highlight that 20 USD/pm is still quite a lot to most people.

To illustrate:

My employer gives me $150 cloud credits. 20 USD seems like pocket change

Me paying out of pocket...20 that's like 2x netflix but fine whatever.

Me being part of the other 95% of the world...unaffordable.

But really my main objection here is why. To borrow my gitlab example...how does adding a interface on top of core software up requirement from zilch to 8 gb? Like wtf is going on underneath that bonnet. It's not doing the heavy lifting - git is doing that. So for a SINGLE user install...whats that 8GB doing? 8GB worth of UI? It's installing via CLI for gods sake...

Well the language choice does make a big difference.

Python has the GIL meaning parallelism comes at the cost of increased memory and CPU consumption because it's typically going to spin up multiple copies of the Python interpreter and your application. This is also true of Ruby, so it applies both to Gitlab and Quay.

Quay uses Gunicorn which uses pre-fork model which means spinning up multiple processes of Quay which can lead to increased CPU and memory requirements. Obviously you need multiple cores to take proper advantage of multiple processes, and multiple processes each result in multiple copies of the same application running, thus more memory.

This is kind of a fact of using something like Python or Ruby unless you design your application to use an event driven architecture with something like twisted, tulip, async, tornado, etc. Even then, unless you have async versions of the libraries your using (eg: your DB driver) that won't necessarily remove your need for multiple processes.

Because it's more than just UI? To stick with your example, where in OSS git do you get a task runner that executes your test pipeline? Do you think that might use some RAM to coordinate? Yes. Where do you get an audit log exporter in OSS git? Etc.
Oh this isn't even pipeline anything yet. It won't even install.

Normally I'd assume it's not working because I'm doing something wrong. But this is their omnibus installer - it's a single line.

So then use docker hub
Might have a look. A couple attempts and various error messages later I'm not super enthusiastic about gitlab though tbh.
Unfortunately that seems to be common. Artifactory for example has similar requirements. Guessing that running full free text search and analysis on the artifacts are the main culprits.

https://www.jfrog.com/confluence/plugins/servlet/mobile?cont...

It's java so you have to be generous with memory for the JVM.
Quay isn't just a container registry for hosting images. It also includes security vulnerability scanning and image building, etc.
Most of it will be used for cache by kernel if you don't use the image building and Clair on the same host.