SMB compression
Mar 24, 2020 00:15 · 638 words · 3 minute read
Hey folks, Ned Pyle here again. Today I’m going to talk about a new feature coming to Windows and Windows Server. It is SMB compression. You have been using compression with zip files and other technologies probably your entire IT career. What we are adding now is the ability to inline compress while you’re copying files, saving you bandwidth and time, especially when you’re moving really big data. So let’s show this in a demo really fast. So here’s my usual Robocopy guile running. I’m copying a 10 gig file. It’s a pretty compressible file. You know, it’s sort of like a VHD or an ice or something like that.
00:49 - You can see that it’s using a lot of network right now, quite a bit of the actual network bandwidth. It’s not copying particularly, you know, slow. It’s copying at the throughput that I would expect for this network with its amount of congestion on it. I’m going to time compress this just to save a little time here in the demo. I’m using a few small percentage of CPU, it’s not so bad. It’ll copy it in about two minutes, which is completely expected, best-case for this one gigabit network. So now, what if I was to do this exact same operation but with compression. So I’m going to delete this file after destination. Let’s go ahead and try this again with Robocopy. This time with a new option that’s been added to Robocopy or compress.
01:54 - That’s going to turn on the SMB flag to do compression. You can see right away that I am going way faster. You can see that my network performance, my network usage is way down. I’m barely touching this network now. My CPU is not appreciably that much different, six to seven percent, give or take. It’s really almost done. I have not done any time-lapse. In fact, we’re finished now. Instead of taking two minutes, this period here was only about 23 seconds.
02:28 - That exact same file, 10 gig, instead of two minutes, 23 seconds. Now, what if that file was not very compressible? Let’s say it was an extremely well designed file format, a JPEG or something like that, that already has an enormous amount of compression built into itself. So here I’m copying a file which really doesn’t compress at all and, you know, I’m getting that same throughput as it was before. I’m really kind of worried. This is a five gig file. So it’ll take about half the time taken about, instead of two minutes, it’ll take about a minute. I’m really kind of worried at this time that.
03:03 - What if I was to try and copy files that won’t compress and I have compression turned on will that make that a little bit slower as it waste time or actually perhaps even uses more CPU just to find out if the file couldn’t have been compressed anyway. I mean, how do I even know sometimes? So I’m using the “Compress” option. Notice that it took the same amount of time. We actually sample as we compress. Even when you put the flag on to see if it seems like the file is compressing well or not. If it doesn’t, we just ignore your flag and carry on copying the file normally without compression. Pretty slick. So that was the demo. I hope you have found it interesting.
03:48 - SMB compression is a real game changer for people copying large amounts of data. As time has gone by, improvement does files get bigger, not smaller. So SMB compression is there to help for you in the future. For more information, take up the URL on the screen here somewhere and I will talk to you later. .