mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-27 18:57:53 +00:00
Don't allocate 1 GB of memory to create a file
bs=1G means "read 1GB into memory at a time"; we really don't need that. On a system with 6GB physical memory (while our test VM is configured to have 8 GB of virtual RAM), this seems to result in trashing and exceeding the 30s timeout, while with a smaller block size, the copy happens in <13 seconds. (dd itself reports 11 s vs. 27 s). Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
9774d5338e
commit
e5d2869e41
1 changed files with 1 additions and 1 deletions
|
|
@ -698,7 +698,7 @@ subdir**`
|
|||
Expect(os.WriteFile(filepath.Join(subdirPath, "extra"), contents.Bytes(), 0o644)).
|
||||
ToNot(HaveOccurred())
|
||||
randomFile := filepath.Join(subdirPath, "randomFile")
|
||||
dd := exec.Command("dd", "if=/dev/urandom", "of="+randomFile, "bs=1G", "count=1")
|
||||
dd := exec.Command("dd", "if=/dev/urandom", "of="+randomFile, "bs=1M", "count=1024")
|
||||
ddSession, err := Start(dd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(ddSession, "30s", "1s").Should(Exit(0))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue