[swift-dev] Mysterious memory improvement and regression
Greg Parker
gparker at apple.com
Tue Apr 25 01:36:35 CDT 2017
> On Apr 24, 2017, at 8:52 PM, Pavol Vaskovic <pali at pali.sk> wrote:
>
>> On 25 Apr 2017, at 01:28, Greg Parker <gparker at apple.com> wrote:
>>
>> The value of MAX_RSS depends on OS behavior. Other activity on the same machine may change MAX_RSS of the benchmark.
>
> Can you please describe the mechanism of how “other activity on the same machine may change MAX_RSS of the benchmark”.?
Not all memory used by the benchmark counts against its RSS. For example, paged-out and VM-compressed memory are both excluded. If there are other processes contending for memory while the benchmark runs then the benchmark's RSS will be artificially reduced.
Did you see any time difference between the 3MB and the 10MB runs?
>> The changes you saw might not be "real”.
>
> How was that not real? I have logs that prove that. See the attachment in original post.
The possibility is that the benchmark's RSS did in fact change, but the benchmark's "real" memory usage did not.
>> If you re-run the 2017-04-15 builds today, do you still see 3 MB instead of 10 MB?
>
> Nope. If I saw it now, I wouldn’t be searching for that, but congratulating the brave committer that gave us this improvement.
That tends to suggest a difference in the test environment rather than a change in Swift. If some Swift changes were responsible for the RSS decrease and subsequent increase then re-running the benchmark with that version of Swift ought to exhibit the same RSS behavior.
Measuring memory usage is good. RSS is a difficult value to use for such measurements.
--
Greg Parker gparker at apple.com <mailto:gparker at apple.com> Runtime Wrangler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170424/bc97085e/attachment.html>
More information about the swift-dev
mailing list