From: Richard F. <fa...@be...> - 2018-04-28 16:35:51
|
I think most common lisp implementations provide handles on the garbage collection routine so that someone can guide it into more efficient modes that depend on the user/programmer's anticipation of past or future memory usage. In the past when GCs took noticeable chunks of time and made the system less reactive to input, it was more important to try to schedule a GC when it would not be noticed. A pause of 30 seconds would be enough to make a user think the system had died. If a GC takes 2 seconds, many people will think it was just some operating system or networking hiccup, so not a big deal. Is this what people are worried about? Or are there systems out there that take 30 seconds for a GC?? "Generation scavenging" GCs may be in the millisecond range for some computers; they could be done whenever there is display output then input from a keyboard (if we can tell that, anymore). e.g. (%i10) ... a GC happens. Here are some other ideas, if you don't like that one... When showtime:all is set, do a GC When kill(...) is run, do a GC (the user has expressed interest in reclaiming memory!!) when compile() is run. (we expect it to take some time, anyway) In my recent experience, the effective use of high-speed cache has had much more influence on runtime than total amount of memory, or for that matter, the cleverness of algorithms. Given that, a GC that copies or allocates active data into adjacent memory may be a major winner. Traversing a list (which Maxima does essentially all the time) that is scattered in memory is generally much slower than a list where each pointer points to the next word... RJF On 4/23/2018 12:44 PM, Raymond Toy wrote: >>>>>> "David" == David Scherfgen via Maxima-discuss <max...@li...> writes: > David> Maybe you're right, Robert. > > > > David> But I still think that Gunter may have misinterpreted GCL_MEM_MULTIPLE. > > David> If, as stated in his comment, memory usage becomes a > David> problem in multi-user environments, then I think it's the > David> sysadmin's responsibility to restrict memory usage of *all* > David> the processes of each user. At least on Linux, this is > David> possible. > > David> Limiting only Maxima's memory consumption to an > David> (arbitrarily chosen) fraction if total memory doesn't seem > David> like the right solution. And it prevents me from using all > David> memory if I really need/want to. > > I agree that the user should be able to allocate however much memory > he wants. > > I do have issues with gcl defaulting to all available physical memory, > but that's not maxima's fault. (I have 128 GB of memory on machine at > work, but only 8-12 GB at home. Does gcl really need to allocate 128 > GB of memory to itself? Is there really a maxima use-case that won't > fit in 8-16 GB of memory? That seems like a more useful default > limit.) > > -- > Ray > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss |