Low-space signals in production environments

John M McIntosh johnmci at smalltalkconsulting.com
Sun Feb 11 06:47:19 UTC 2007


Also see my notes from
	Subject: 	Re: lowspace signalling and handling issues
	Date: 	May 3, 2005 7:56:09 PM PDT (CA)

 >I've taken it down to 32K on a 512MB image via that code that  
allocates links...
 >Grinds away until freespace goes under 98 bytes (can't allocate a  
context record).

but there was no interest in sticking those changes into the VM.   
Would have to hunt for the bits. It removed some complication between  
the low memory signal, the upperboundary check and doing a GC.   
However I think it was simpler to turn on the bias to grow logic.


On Feb 10, 2007, at 10:40 AM, Andreas Raab wrote:

> Hi Guys -
>
> I am just being very confused about the current behavior of Squeak  
> in the case of memory allocation failure. In my use case I have  
> incoming network requests which are handled at high I/O priority  
> and need to allocate memory based on the size of the request. Given  
> a malformed request, this can easily lead to an allocation failure  
> which really should raise an error, be caught and be done with.
>
> However, there doesn't seem to be a way of handling low-space  
> conditions  by the client. In the case of an allocation failure,  
> all that appears to be happening is that the low-space semaphore is  
> being signaled with the obvious assumption that the low-space  
> watcher will preempt the running process, make some space and  
> continue. But equally obviously this just can't work if the running  
> process is at a higher priority than the low-space process and  
> since the running process recurses directly into #basicNew: again  
> this will bring your system to a screeching halt.
>
> Since I can't possibly be the first person who noticed that (or at  
> least I really don't hope I am) my question is, how do people deal  
> with that situation in their production systems? I have never seen  
> the issue discussed but I would expect that it has come up on some  
> Seaside or other network-related lists.
>
> Right now I'm just thinking to do something like signaling an  
> OutOfMemory error which as its default action would signal the  
> lowspace condition, leaving the client with the option to handle  
> the request differently if needed.
>
> Cheers,
>   - Andreas
>

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list