BAD BEHAVIOUR IN THE MPS

Richard Kistruck, Ravenbrook Limited, 2006-12-10


1. INTRODUCTION

This is a brainstorm about what could cause bad behaviour in the MPS, from RHSK considering the Configura shark-fin problem [shark-fin].

This document is Confidential.  Readership: Ravenbrook staff, Configura staff.  (But the intention is to produce a declassified version of this document).


CONTENTS

  1. Introduction & Contents
  2. Classification
  3. Observations
  4. Brainstorm
  A. References
  B. Document history
  C. Copyright and license


2. CLASSIFICATION

Tuning that affects:

Ta-trigger: triggering of a collection  (eager / lazy)

Tb-whiten: condemned-set of a collection

Tc-rate: trace->rate of a collection (eager / lazy)

Td-labour: how laborious the collection is (if remembered sets are poor)

Te-nailed: how much is nailed via ambiguous refs or barrier hits at RankAMBIG

Tf-emerg: emergency tracing, and other causes of conservatively retaining garbage.


Defects that:

Da-slow: make tracing slow (eg. N^2, pointless repeats, unnecessary work)

Db-garbage: preserve garbage.


3. OBSERVATIONS

Working-set size (WSS) of Configura's process grows during a compilation.  At various points there is a 'shark-fin': a linear-with-time rise that very roughly doubles WSS, followed a linear-with-time drop at an only slightly faster rate, to about the pre-shark-fin level.  

The first process run ("extension_build0.jpg") does a lot of work, and there are three shark-fins.  In each case the WSS before and after is the same.  

Having run once, later process runs (runs 20, 21, and 22: "extension_build 20-22.jpg") do less work.  Near the end of each, plus once in the middle of 21, there is a shark fin.  Some shark-fins result in WSS decrease, others in increase.  The WSS at end of run grows: after 21 bigger than after 20, and after 22 is bigger still.

Could these shark-fins be full collections?

If so, could bad tuning, or defects, in the MPS cause these full-collections to not collect garbage properly?


4. BRAINSTORM





A. REFERENCES

[shark-fin] "Full collection problems"; rhsk; 2006-12-10; <http://info.ravenbrook.com/mail/2006/12/08/15-57-33/0.txt>

[#REF_NAME#] "#REF_TITLE#"; #REF_AUTHOR#; #REF_DATE#; <#REF_URL#>



B. DOCUMENT HISTORY

2006-12-10  RHSK  Created from thinking about [shark-fin].


C. COPYRIGHT AND LICENSE

Copyright (C) 2006 Ravenbrook Limited <http://www.ravenbrook.com/>.
All rights reserved.  This is an open source license.  Contact
Ravenbrook for commercial licensing options.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Redistributions in any form must be accompanied by information on how
to obtain complete source code for this software and any
accompanying software that uses this software.  The source code must
either be included in the distribution or be available for no more than
the cost of distribution plus a nominal fee, and must be freely
redistributable under reasonable conditions.  For an executable file,
complete source code means the source code for all modules it contains. 
It does not include source code for modules or files that typically
accompany the major components of the operating system on which the
executable file runs.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

$Id: //info.ravenbrook.com/project/mps/doc/2006-12-10/bad-behaviour/index.txt#1 $