Web lists-archives.com

Re: attempting to format brd device results in OOM kills

On 06/18/2017 04:43 PM, Jeff Layton wrote:
>>> Just checked, and creating a 1TB ram disk and then running mkfs.ext2 on it
>>> writes 16851MiB of data. I can't say I'm surprised you OOM, if you run that
>>> in a 8G VM, as you're about 8G short.
>>> I'm puzzled as to why the discard change would make any difference, however.
>> Reverted the patch, and I see identical behavior. The only difference is that
>> the whole device is trimmed first, as expected. But it still writes ~16G
>> afterwards.
>> Are you sure this commit is what broke things for you? Honestly, I don't see
>> how it could ever work with 1TB ram disk, 8G of RAM, and 16G of data written.
> My mistake! My brd rd_size parameter was too large by a factor of 1024
> (I missed that it was in kbytes and not bytes). With it sanely sized to
> 1G (as I had actually intended), it works fine.
> It's interesting that the older kernel survives this and the newer one
> doesn't, but since it's such a pathological setup I'm not too worried
> about it.

Beats me, I don't see how anything could make a 16G ram disk work on an
8G setup? If the above has any change in behavior, I'd be inclined to
point at vm changes.


Jens Axboe