Docker images are layered for a reason. If you’re having to download multi gigabyte docker layers multiple times, something has gone very wrong.
Azure charges (like the other major cloud providers) by egress data. I feel bad for whoever is paying the bill for 20gbps going out.
In general, people in ML shouldn’t be pulling raw data in the hundreds of gigs down to mobile workstations. That’s a security and scaling disaster.
Trying not to be too much of a curmudgeon here, but this is the problem with 1 gbps connections. They are so good they prevent you from doing the right architecture until it’s far too late.
A good remote work setup should leave all of the heavy lifting close to the source and anything that does need to be downloaded should be incremental/shallow copies. You should be able to work from a stable coffee shop WiFi connection.
I think there are different philosophies, just like 'no comments allowed in code', this is a matter of judgement.
I saw 5 different corporations setup centralised workflow, and usually you end up with a massive cloud bill, incorrectly configured admin rights, under-resourced VDI, and a ticketing system that takes a week to resolve the smallest issue.
If we assume for the moment that data in question is not highly sensitive (for example public satellite imagery), there is nothing wrong with getting every dev a beefy workstation with 50 TB of storage and a 20-core CPU, and it's often even cheaper.
If you are working with ML and have public datasets, just use the original source. Make a public mirror if you want to collaborate. Make it accessible via BitTorrent. You can bet that the amount of savings you will get from AWS will be enough to give each dev a NAS with a few tens of TB, which then they can even then use to host/mirror the public data by themselves.
The analysts were pulling down a ~0.1% sample to develop the ML algorithms locally, and then deploying the final thing in the cloud to run through the whole petabyte.
Local development has its advantages, such as high flexibility and very fast cycle times. It's fantastically expensive to outperform a modern PCI 4.0 NVMe drive in the cloud. Locally it's a $200 part.
When I worked at Vercel during the days we supported Docker hosting (back when it was still ZEIT), we saw that even among many tenants on the same machine, the "layers" thing wasn't really that beneficial - we still had to fetch a ton of stuff over and over again.
So this is great in theory, but it doesn't really pan out in practice.
Reasonable, IMHO.
ZEIT had a pretty aggressive cache anyway, for the short time it was implemented (before ZEIT moved away from docker hosting, at least).
There are some times when your thinking/workflow is constrained by your environment, sometimes significantly.
Well the images need to be in some order, and if you are fine tuning the very initial parts of the image, this can happen.
But it seems a better transfer algorithm could be used for those individual layers. It rather seems like if they don't match, everything's transferred, while there could be a lot better options as well. If we consider that they are structured like file systems then it opens even more options.
---
So I took a peek on my local Docker installation. It seems the layer files on the drive are gzipped json.
That's right, .json.gz, _that includes the files BASE64-encoded_.
Yes, I believe there is room for improvement, if this is also the format they are transferred in.
[1] head -c 100000 /dev/urandom | base64 | gzip | wc -c
But as commented to me, that was incorrect, the payload in the files I saw was actually binary-encoded metadata. The actual archives are stored only in extracted form in the client and .tar.gz in the registry. Not that putting binary metadata in JSON is really optimal to me either, but maybe there are terrific reasons for doing it. Just check /var/lib/docker/image/overlay2/layerdb/sha256/*/tar-split.json.tar.gz; the fragments seem to be straight from tar, so maybe tar is used to interpret them?
Certainly .tar.gz files are not the most optimal for the purpose of incremental updates either. It's difficult to say how much a more sophisticated transfer protocol/storage format would benefit registry servers, though some clients could benefit a lot from it.
If a space-efficient merkle-tree-hashed archive-format suitable for efficient incremental updates doesn't exist, then someone should make one ;-).
Nevertheles, an archive format other than .tar.gz could be transferred more efficiently given a previous version of the same image. Or, even .tar.gz could be transferred more efficiently if both ends extract the file first, and if there is a need to preseve sha256, then that needs a bit more work.
I ditched the 10G because the 10G switch was hot and noisy and had a fan, whereas my 1G equipment was silent and low power. This could be overcome by putting the switch in another room, obviously, but I haven’t missed it enough to go through the trouble yet.
> During the 2 years of the pandemic I've been working from home with gigabit Internet.
Doesn’t this make every other point in your post moot? I’m similarly limited by Gigabit internet, so the only time I benefit from 10G is transfers to/from my local NAS. I realized that I almost never lose time sitting and waiting for NAS transfers to finish, so even that was only a rare benefit.
If I was buying new equipment and building out something new, I’d pick 2.5G right now. It’s significantly faster than 1G but doesn’t come with the heat and noise that a lot (though not all) of 10G switches come with.
I’m sure I’ll go back to 10G some day, but without >1G internet and no local transfer use case, I found the extra hassle of the equipment (laptop adapters, expensive/hot/noisy switches) wasn’t really worth it for me yet.
10G was cool but I can’t recall a single instance where I really wish I had it back.
Same. It only really made a small difference to my most transfer-heavy workflows. Even a fast NAS is still slow relative to local storage (it’s not just about sequential transfer speeds).
I’m sure I’d feel differently if I was doing something like video editing where I had to move large files back and forth frequently and wait for them to be ready.
Do you have home servers you forgot to mention that you’re uploading docker images to, and those could benefit from 10gb Ethernet?
(For me, I use gigabit Ethernet everywhere at home but sometimes need to transfer large disk images from my desktop to my laptop, and using a thunderbolt cable as a network cable helps here, I can get closer to 2 gigabits of transfer speed before disk writes seem to be the bottleneck.)
> Conclusion:
>The majority of 4K movies (75%) I tested have bitrates over 100 Mbps and many seconds where bitrates spiked over 100 Mbps. Some have 100s of seconds where bitrate spikes over 100 Mbps, and will most certainly cause problems if played with bandwidths less than 100 Mbps on devices that don't buffer well such as the LG TV or Roku TV. To make sure you get the best experience without any buffering or transcoding on such devices, you need to make sure you have a bandwidth that exceeds at least 150 Mbps to play most 4K movies properly. Ideally, it should be higher than 200 Mbps.
"If" is doing some heavy lifting there.
The linked post shows that the average bitrate of every sampled 4k movie was less than 75 Mbps. The author even bolded "on devices that don't buffer well such as the LG TV or Roku TV"
Plus I have a service which downloads stuff for the archive team so that’s always doing some network traffic.
There is also a CI gitlab worker and that is also always doing some build with docker images from scratch.
I just wish more than 1Gbps was something that was offered and I can upgrade but so far I’m limited by my ISP with no way to upgrade. Inside my network I have 10Gbps and I have never hit that limit. It was expensive and I needed it for a now deprecated servicing.
1 Gb/s network is probably enough for most people, I agree. But I certainly think there are many use cases for faster networks, especially in digital-heavy households.
I work inside a workstation but occasionally on a laptop as well.
Having 10GbE will help me when I'm on my workstation. It's not fatal, definitely, but it adds up to lost productivity.
So I read a 10GB chunk of a file that I know is not cached:
$ dd if=/some/large/file of=/dev/null bs=1M count=10240
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB, 10 GiB) copied, 11.3378 s, 947 MB/s
The 947 MB/s figure printed by dd matches the speed reported by a "zpool iostat tank 1" running during the benchmarking, which confirms I'm not reading from the cache. When I repeat the same command, dd completes almost immediately reporting a speed of about 6-8 GB/s on my machine, while the zpool iostat command shows zero read bandwidth.Additionally yep, I plan to have one NVMe dataset sometime this year.
And even further, I plan to add a few enterprise HDDs in stripe and mirror. If you have 8 (with capacity of 4 for full mirroring) and each is at 260MB/s then et voila, you get 10GbE again.
But the 10Gbit network is there for the flash pool.
Consumer SATA SSDs are plentiful enough that I'm just going all in on flash when I revamp my server and do an 8 drive (+1 hotswap) RAID10 build or whatever. I don't need +60TB or anything and 8-9 drives is about the limit you can find on high end consumer mobos I think...
It is not required for the NAS to be in the same room where you sleep.
With a proper drives (and maybe some APM tinkering) you can make a very quiet one. Also using 2.5" drives is an option too.
Though if you can throw money at the problem than of course you can just buy a bunch of TB SSD drives.
The only use internally would be central storage server. But all the new NVMe SSD's are faster than 10 gigs, so my internal network would be the bottleneck.
The next logical step would be upgrading to 100 gig network, but that is too expensive right now. I should buy more fast NVMe storage for that money.
If I could get 10 gigabit connection to internet, it would probably make more sense, but I don't see it coming that soon. And I'm paying 15€ for 1 gigabit right now, I would not be willing to pay much more for 10 gigabit connection.
On top of that, my Zabbix monitoring data shows that I rarely saturate the 1 gigabit connection to internet. Most of the time I don't need more than 10 megabits.
Some advice: make sure you know the form factor of your NICs. I accidentally bought FlexibleLOM cards. They look suspiciously like PCIe x8, but won't quite fit. FlexibleLOM to PCIe x8 adapters are cheap though.
I've never seen docker images of that size that can't be shrunk with multistage, or docker shrink. I can see how someone could get to that size with just baking in all their models to the image itself but yuck.
They are no-where near that size ...
they only get larger from there. Largest on my machine right now is showing to take 20GB. Granted there are a lot of shared layers between images, so the amount of space on-disk is much less than 20GB. But if you don't have any of the layers already? You're looking at 20GB easy.
I just downloaded: https://hub.docker.com/_/microsoft-dotnet-framework
It was about 2.7 / 2.8 GB in size.
Total size on disk was 8.7GB but we are talking about download here.
I would say you should be moving to .Net 6 it's been several years now that .Net Core has been out so there is no excuse.
None of this is an excuse to get a 10Gbps internet connection to your house. I have a 500Mbps connection and with the corporate firewall my laptop gets 100-200Mbps connection and pulling those containers was like 10 minutes.
Edit: In case anyone thinks I'm lying:
https://devblogs.microsoft.com/dotnet/we-made-windows-server...
same, I live in a rural village in france where I get 2GB fiber. Yet all my computers aren't able to leverage that.. quite frustrating to see speeds being limited at 110/120 megabytes/s where my drives are easily able to handle gigabytes.
In what world?
Network cards: intel, mellanox, solarflare. Intel has a lot of drivers for all OSes, mellanox is most stable electrically (you can provide it with separate power, no need for fancy adapters, just plug any 12v in), solarflare is cheapest on ebay if you buy 2-3-generations old cards. Actually, any 10G network card will do, just check if they have drivers for your OS.
Thunderbolt: there are ready-made eGPU cases, they are costly but easier to handle. If you want to be cheap: wait for sale of any thunderbolt3-to-nvme adapter. PCBs for all of them are made by the same factory (you can find it on alibaba/taobao) they differ only by box and branding. Based on intel JHL6340
edit: I have got this, it was on-sale at the time https://www.aliexpress.com/item/4000200151507.html
edit2: just checked eBay, the cheapest solarflare "S7120" (it is SFN7022F actually) is $15 (!) + free shipping, wow. Though you'll need some sfps, they start from $6 (FTLX8571)
A 4kx4k map layer section, in RGBA is 64MB. Each layer on the map has multiple types of mask applied (brushed alpha, brushed noise-function,...) so there's another 64MB of XXXX data per layer. A map can have (say) 10 layers on it, so we're up to 1GB, and then there's the data for ephemeral layers ("stamped" images at co-ords and scale, alpha,rotation). The stamps themselves are usually stored in an 8kx8k layer so that's another 256MB
When your 'save' action is 1.5GB of data, a 10Gbe network is much preferred over a 1 Gbe network...
All of this is rendered down for production of course, but during development, each layer is kept separate along with its masks.
Wait, why are the masks RGBA instead of grayscale?
1st one is typically a brush-in one - basically just Alpha brushed in from various alpha-brushes over the map
2nd can be a noise function, where the 1st alpha mask is multiplied by the second to get a brushed noise, and the noise might be useful for randomly-shaped patches of different-colored grass in a scene
3rd might be a shadow mask, where any objects "stamped" on top apply a default shadow at a given angle, and that default shadow is written into this channel. Then the map-maker can alter those if (for example) a shadow hits a wall.
Then there's the shader mask - so you can select a given shader for a given area of the map. These'll all be batched up later, but if you want flowing water, brush in where you want the water shader to be applied. Same for smoke, lava, etc. etc.
I have tested Azure and AWS speed out to the internet and they too won't get 20/100 Gbps. That high bandwidth is for connecting instances within the AZ. Once any of the traffic has to go over the internet it's much lower.
> I'll regularly pull down 50-200 GB to my laptop for some reason or another
This is a serious failure in your workflow. You should be looking at reducing that size considerable in terms of a docker image.
Exactly. I understand why some may want or need 10Gbps. But OP comment should not even be top voted.
Yes, virtual desktops suck in several aspects, but we couldn't expect everyone to have gigabit Internet at home.
1GbE networking is one of the slowest interfaces on modern computers.
- The slowest USB3 spec is 5Gbps. USB3 is a mess, but you can easily far exceed 1Gbps with the absolute worst of it.
- The current fastest USB spec is USB4, and is at least 20Gbps, and sometimes 40Gbps
- Thunderbolt/Lightning both push 10's of gigabits depending on spec
- 802.11ac ("Wifi 5"/"Wave 2") is capable of Gigabit speed, and 802.11ax ("Wifi 6") easily exceeds 1Gbps
- Even Cellular connections can exceed 1Gbps these days with 5G, though admittedly realistically you're looking at 100Mbs-1000Mbps
- Individual SAS/SATA rotational drive easily push passed 1Gbps in seq workloads
- Individual SAS/SATA SSD's often push 3Gbps, and SATA itself supports up to 6Gbps, with SAS up to 12Gbps.
- PCIe NVMe in it's slowest spec (Gen3 at 2 lanes) is still 16Gbps, most typically running at up to 32Gbps at Gen3 x4
- PCIe5 consumer devices have launched (Gen5x4 lane NVMe is 128Gbps)
- PCIe6 is around the corner for enterprise
To add insult to injury, in the consumer space they're trying to tout 2.5GbE as some sort of premium new NIC, despite it replacing 10GbE in the premium NIC space from several years ago (eg Asus X99-E-10G-WS). It's maddening. 10Gbase-T, 10Gbe, and Cat6a has been around for well over a decade (to say nothing of SFP+ 10G). Granted they're starting to reposition 2.5GbE as the new 1GbE, which is far more sensible, but still positions your NIC as one of your slowest interfaces
1GbE is the limiting factor to speeds these days, with internal storage/devices and nearly all alternative interfaces vastly outspeeding 1GbE. Even cheap external SATA SSD's and a common usb3 cable can greatly exceed your 1GbE network speed. If you have multiple devices, and want to transfer data between them, a network cable is supposed to be the superior choice. Not Wifi, Not USB, but a network cable over the local network. But it's actually much faster to plug a drive into one device with USB, transfer the data, unplug, plug into the other device, transfer again, than to use a standard 1GbE network interface. Shameful. Just because your WAN interface is likely 1Gbps or less doesn't mean there isn't a use at the prosumer level for >1Gbps network connections for use at the LAN level.
Wifi 6 officially has a real world limit of 700mbps [2] and drops to half that if you're more than a few feet from the router. Passive USB 3 and thunderbolt cables have a max length of 2 meters [3]. The rest of the interfaces you've listed like PCIe all operate on the scale of inches and plug straight into the motherboard.
Plus it really isn't very expensive to upgrade to 10G given the use case is pretty niche for home use. You can get a budget SFP+ Switch and 2 NICs for ~$300.
[1] https://en.wikipedia.org/wiki/10_Gigabit_Ethernet#10GBASE-SR
[2] https://www.theregister.com/2019/12/05/wifi6_700mbps_speeds/
[3] https://www.newnex.com/usb-cable-maximum-length-limits.php
> You can get a budget SFP+ Switch and 2 NICs for ~$300.
Yes, this is part of the problem. In 2016's we started to see mainstream adoption of 10G, which hopefully would lead to the more availabile, more affordable, consumer friendly ease of use twisted pair Cat6a and RJ45 10Gbase-T Switches. Instead, Enterprise had already largely moved on from 10G (largely supporting it as a legacy connector via SFP28 being backwards compatible with SFP+) and Mainstream/Prosumer manufacturers instead decided to regress from the 10Gbase-T deployments to 2.5GbE.
As a result we're not seeing a lot of development in the 10G space, and in many ways a regression towards 2.5GbE. Sure, if you don't mind the noise and know your way around a cli, there are plenty of surplus enterprise switches on the cheap. And I don't mind Optics/DACs. I run 10G at home (cat6a, Intel X550's, Arista 7050T-64, which used to be a few hundred bucks) and 25G/100G in the lab (CX4 LX's/CX6 VPIs connected to an Arista 7260CX-64). But it is unfamiliar to most consumers. Not a huge hurdle, but a strange ask considering 10Gbase-T with familiar twisted pair and rj45 aint new by any means. Mikrotik and UBQT both have some options in the space, but the cost of these newer switches certainly doesn't fall in the $300 budget, unless you only need like 2-4 10G ports on the switch and are fine with SFP+. And yes, >4PHY 10G SFP+ and/or 10Gbase-t switches exist, but you're not getting them and NICs w/ DACs (or especially fiber if you need a longer run akin to a standard Cat5 deployment) inside your $300 budget, and there's very few on the market that'll fit in your budget even if you stretch it to $500.
TL;DR: Yes, 10G is technically available, but it's a strangely esoteric niche that exists after the mainstream decided to regress from 10GbE towards 2.5GbE.
As a counter-point, I'm regularly limited by 1 Gbps PHY limits. During the 2 years of the pandemic I've been working from home with gigabit Internet. Why gigabit? Because that's the "speed limit" of the Ethernet PHY in the fibre broadband box, and also my laptop's ethernet port.
My laptop can write to disk at multiple GB per second, or tens of gigabits.
I transfer large volumes of data to and from a "jump box" in Azure that can easily do 20 Gbps out to the Internet.
I regularly update multiple Docker images from scratch that are gigabytes in size, each. I then upload similarly large Docker images back to Azure.
Even when physically present at work, I'll regularly pull down 50-200 GB to my laptop for some reason or another. One time I replicated an entire System Center Configuration Manager deployment (packages and all!) to Hyper-V on my laptop because the NVMe drive let me develop build task sequences 20x faster than some crappy "enterprise" VM on mechanical drives.
I have colleagues that regularly do big-data or ML queries on their mobile workstations, sometimes reading in a decent chunk of a terabyte from a petabyte sized data set.
All of these are still limited by Ethernet PHY bandwidths.
Note that servers are 100 Gbps as standard now, and 200 Gbps is around the corner.
The new Azure v5 servers all have 100 Gbps NICs, for example.