Live data from Hacker News

A native Go userland for your Raspberry Pi 3 or 4 appliances

github.com

11–20 of 37 posts

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#11
post #8

an interesting project. the size of the image concerns me: kernel+boot 100MB, with C it could be 4MB. kernel+boot+basicpackages 500MB, with C it could be 16MB. Golang is designed to be static all-in-one packages for each application(e.g. microservices), when you run a lot of them in any given system, it becomes really large together. I don't mind to use one or two go binaries in my embedded board, when I need a few o…

To be fair, this is designed for Raspberry Pi, and nowadays it's almost impossible to find a micro SD that's less than 16 GB and costs significantly less than a 16 GB one, I don't think a couple hundred MBs are a concern (even if it hurts my soul too)

What's the max/typical read bandwidth from an SD card on a Pi? Even if the storage space is there, you might still get perceptible latency improvements with order-of-magnitude smaller binaries.

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#12

an interesting project. the size of the image concerns me: kernel+boot 100MB, with C it could be 4MB. kernel+boot+basicpackages 500MB, with C it could be 16MB. Golang is designed to be static all-in-one packages for each application(e.g. microservices), when you run a lot of them in any given system, it becomes really large together. I don't mind to use one or two go binaries in my embedded board, when I need a few o…

I originally thought go binaries we’re large. Turns out they can be quite small.

https://joeldare.com/small-go-binaries

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#13
post #8

Earlier quoted context omitted.

To be fair, this is designed for Raspberry Pi, and nowadays it's almost impossible to find a micro SD that's less than 16 GB and costs significantly less than a 16 GB one, I don't think a couple hundred MBs are a concern (even if it hurts my soul too)

What's the max/typical read bandwidth from an SD card on a Pi? Even if the storage space is there, you might still get perceptible latency improvements with order-of-magnitude smaller binaries.

If that’s an issue just cache the file in RAM. 500MB is still less than the system memory on a Pi (and as I’ve pointed elsewhere, the OP was reading the partition table not the application file sizes).

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#14
post #9
post #5

Earlier quoted context omitted.

> aside from the Linux kernel and proprietary Raspberry Pi bootloader — only contains Go software. Given this is what the README states, how can it be a GNU/Linux distribution? It doesn’t include a shell or anything like coreutils either (GNU or otherwise).

> how can it be a GNU/Linux distribution? You're taking a few F/OSS components (in this case the Linux kernel, the golang toolchain and some custom software) and you're assemblying them into a bootable system. That's almost quite literally the definition of "gnu/linux distribution".

What, no. It's not GNU/Linux if there's no GNU software present.

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#15

an interesting project. the size of the image concerns me: kernel+boot 100MB, with C it could be 4MB. kernel+boot+basicpackages 500MB, with C it could be 16MB. Golang is designed to be static all-in-one packages for each application(e.g. microservices), when you run a lot of them in any given system, it becomes really large together. I don't mind to use one or two go binaries in my embedded board, when I need a few o…

I originally thought go binaries we’re large. Turns out they can be quite small. https://joeldare.com/small-go-binaries

upx will take time/resource to unzip, which could be slow in some embedded systems.

a helloworld go binary is about 8MB, a C is about 20KB(shared libraries), go binary size adds up really fast due to the fact most do not use shared libraries even when there are many go binaries in the system.

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#16

an interesting project. the size of the image concerns me: kernel+boot 100MB, with C it could be 4MB. kernel+boot+basicpackages 500MB, with C it could be 16MB. Golang is designed to be static all-in-one packages for each application(e.g. microservices), when you run a lot of them in any given system, it becomes really large together. I don't mind to use one or two go binaries in my embedded board, when I need a few o…

I originally thought go binaries we’re large. Turns out they can be quite small. https://joeldare.com/small-go-binaries

UPX also prevents re-using pages when multiple instances of the executable are loaded in RAM which is bad on low end systems.

The best solution would be to use BTRFS/ZFS with transparent compression (can use fast algorithms) or even SquashFS if you can deploy the entire app image mounted in a directory.

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#17

an interesting project. the size of the image concerns me: kernel+boot 100MB, with C it could be 4MB. kernel+boot+basicpackages 500MB, with C it could be 16MB. Golang is designed to be static all-in-one packages for each application(e.g. microservices), when you run a lot of them in any given system, it becomes really large together. I don't mind to use one or two go binaries in my embedded board, when I need a few o…

I originally thought go binaries we’re large. Turns out they can be quite small. https://joeldare.com/small-go-binaries

The binary is 7.3MB before compressing. Still not too big.

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#19
post #13

Earlier quoted context omitted.

What's the max/typical read bandwidth from an SD card on a Pi? Even if the storage space is there, you might still get perceptible latency improvements with order-of-magnitude smaller binaries.

If that’s an issue just cache the file in RAM. 500MB is still less than the system memory on a Pi (and as I’ve pointed elsewhere, the OP was reading the partition table not the application file sizes).

I guess, but this argument is basically just saying "RPi is basically just a normal computer now so why be conservative with anything?"

Re: A native Go userland for your Raspberry Pi 3 or 4 appliances

#20
post #16

Earlier quoted context omitted.

I originally thought go binaries we’re large. Turns out they can be quite small. https://joeldare.com/small-go-binaries

UPX also prevents re-using pages when multiple instances of the executable are loaded in RAM which is bad on low end systems. The best solution would be to use BTRFS/ZFS with transparent compression (can use fast algorithms) or even SquashFS if you can deploy the entire app image mounted in a directory.

ZFS on low-end low-RAM system? You must be joking...
Post reply on HN