MonetDB: Feb2013 - Reduce CATNAP in vmtrim

Stefan Manegold Stefan.Manegold at cwi.nl
Tue Jan 8 18:47:06 CET 2013


On Tue, Jan 08, 2013 at 10:12:44AM +0100, Sjoerd Mullender wrote:
> Please revert.
> 
> The reason why there is a loop that sleeps 50 ms per iteration is to get
> a responsive exit.  With your change you have to wait up to half a
> second before the server exits.  That is too long.

"nasty" side effect of this checkin is also that Mtest now takes more than
twice as long as before this very checkin, mainly because each tiny test is
now bound to take at least 500 ms (half a second), rather than 50ms before
...

Stefan

> If you want to reduce the frequency with which the vmtrim thread does
> actual work, you need to change the number of times the loop is run, not
> the duration of the sleep.
> 
> On 2013-01-08 01:21, Martin Kersten wrote:
> > Changeset: 4ca22f5177b6 for MonetDB
> > URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ca22f5177b6
> > Modified Files:
> > 	gdk/gdk_utils.c
> > Branch: Feb2013
> > Log Message:
> > 
> > Reduce CATNAP in vmtrim
> > The overload on memory is already protected in the dataflow scheduler
> > and optimizer pipeline, which means we probably can relax the time to
> > issue the BBPtrim().
> > 
> > 
> > diffs (22 lines):
> > 
> > diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
> > --- a/gdk/gdk_utils.c
> > +++ b/gdk/gdk_utils.c
> > @@ -1034,6 +1034,7 @@ GDKmunmap(void *addr, size_t size)
> >   * Their value is turned into a blanc space.
> >   */
> >  
> > +#define CATNAP 500
> >  int GDKrecovery = 0;
> >  
> >  static MT_Id GDKvmtrim_id;
> > @@ -1053,8 +1054,8 @@ GDKvmtrim(void *limit)
> >  		size_t cursize;
> >  
> >  		/* sleep using catnaps so we can exit in a timely fashion */
> > -		for (t = highload ? 500 : 5000; t > 0; t -= 50) {
> > -			MT_sleep_ms(50);
> > +		for (t = highload ? CATNAP : 10 * CATNAP; t > 0; t -= CATNAP) {
> > +			MT_sleep_ms(CATNAP);
> >  			if (GDKexiting())
> >  				return;
> >  		}
> > _______________________________________________
> > checkin-list mailing list
> > checkin-list at monetdb.org
> > http://mail.monetdb.org/mailman/listinfo/checkin-list
> > 
> 
> 
> -- 
> Sjoerd Mullender
> _______________________________________________
> developers-list mailing list
> developers-list at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/developers-list

-- 
| Stefan.Manegold @ CWI.nl | DB Architectures (INS1) |
| http://CWI.nl/~manegold/ | Science Park 123 (L321) |
| Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam  (NL) |
_______________________________________________
developers-list mailing list
developers-list at monetdb.org
http://mail.monetdb.org/mailman/listinfo/developers-list



More information about the developers-list mailing list