From 56aee59a841e8261316c3be50f657f9d414d75ed Mon Sep 17 00:00:00 2001 From: "Paul \"Hampy\" Hampson" Date: Thu, 10 Sep 2020 19:05:30 +1000 Subject: [PATCH 1/2] Use a sparse file for the 8gig test on Windows This is a lot faster (twice as fast in my testing) since file creation is instantaneous, so it's only the tar-stream process that processes all 8 gigabytes of data. Suggested by GitHub user @marosset while adding an integration test for this issue to Moby in https://github.com/moby/moby/pull/41430 Signed-off-by: Paul "Hampy" Hampson --- .../diagnostics/8gig/windows/Dockerfile | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/ue4docker/dockerfiles/diagnostics/8gig/windows/Dockerfile b/ue4docker/dockerfiles/diagnostics/8gig/windows/Dockerfile index f295dba1..2848fbef 100644 --- a/ue4docker/dockerfiles/diagnostics/8gig/windows/Dockerfile +++ b/ue4docker/dockerfiles/diagnostics/8gig/windows/Dockerfile @@ -6,19 +6,5 @@ SHELL ["cmd", "/S", "/C"] # Add a sentinel label so we can easily identify intermediate images LABEL com.adamrehn.ue4-docker.sentinel="1" -# Write an 8GiB file in blocks of 1GiB to avoid allocating too much memory in one hit -RUN powershell "` - $ErrorActionPreference = 'Stop';` - $writer = [System.IO.File]::OpenWrite('file');` - ` - $random = new-object Random;` - $blockSize = 1073741824;` - $bytes = new-object byte[] $blockSize;` - for ($i=0; $i -lt 8; $i++)` - {` - $random.NextBytes($bytes);` - $writer.Write($bytes, 0, $blockSize);` - }` - ` - $writer.Close();` - " +# Write an 8GiB sparse file +RUN powershell "fsutil.exe file createnew file 8589934592" From 087a58484a2d90791e25ac9ecb7cc43ff620bb75 Mon Sep 17 00:00:00 2001 From: "Paul \"Hampy\" Hampson" Date: Thu, 10 Sep 2020 19:12:55 +1000 Subject: [PATCH 2/2] Add Windows-specific bug to 8gig diagnostic help This clarifies that there were _two_ 8gig bugs in Docker history, and the one affecting only Windows containers has not yet had a resolution released. Signed-off-by: Paul "Hampy" Hampson --- ue4docker/diagnostics/diagnostic_8gig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ue4docker/diagnostics/diagnostic_8gig.py b/ue4docker/diagnostics/diagnostic_8gig.py index 6e565d30..cf3f2a32 100644 --- a/ue4docker/diagnostics/diagnostic_8gig.py +++ b/ue4docker/diagnostics/diagnostic_8gig.py @@ -28,11 +28,11 @@ def getDescription(self): Returns a description of what the diagnostic does ''' return '\n'.join([ - 'This diagnostic determines if the Docker daemon suffers from the 8GiB filesystem', - 'layer bug reported here: https://github.com/moby/moby/issues/37581', + 'This diagnostic determines if the Docker daemon suffers from one of the 8GiB filesystem', + 'layer bugs reported at https://github.com/moby/moby/issues/37581 (affects all platforms) ', + 'or https://github.com/moby/moby/issues/40444 (Windows containers only)', '', - 'This bug was fixed in Docker CE 18.09.0, but still exists in some versions of', - 'Docker CE under Windows 10 and Docker EE under Windows Server.', + '#37581 was fixed in Docker CE 18.09.0, but #40444 has not been fixed as-of Docker CE 19.03.12', '', self._parser.format_help() ])