[squeak-dev] Server timeouts and 504 return codes
eliot.miranda at gmail.com
Tue Jan 29 00:57:08 UTC 2019
> On Jan 28, 2019, at 12:04 AM, Tobias Pape <Das.Linux at gmx.de> wrote:
>> On 28.01.2019, at 03:45, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>>> By "the image" I assume you mean the SqueakSource server image. But
>>>> opening the file takes very little time. Original web-sites were
>>>> .html files, remember how fast those were? Plus, filesystems "cache"
>>>> file contents into their own internal caches anyway...
>>> Each file uses one external semaphore, each socket uses three. If you use a default image, there can be no more than 256 external semaphores which is ridiculous for a server, and it'll just grind to a halt when some load arrives. Every time the external semaphore table is full, a GC is triggered to try clear it up via the finalization process.
>>> Reading a file into memory is slow, writing it to a socket is slow.
>>> (Compared to nginx which uses sendfile to let the kernel handle that).
>>> And Squeak can only use a single process to handle everything.
>> That’s configurable. Alas because writing lock-free table growth is not easy the external semaphore table doesn’t grow automatically. But the vm does allow its size to be specified in a value cached in the image header and read at startup (IIRC). So we could easily have a 4K entry external semaphore table.
> Eliot, can you give an example invocation so we can add that to the server?
Im on my phone in the car right now do I can’t confirm, but IIRC it is an image save thing. You specify the size via a vmParameterAt:put: send which updates the size but if you save the image that size is remembered in the image file header. I need to check but the info should be in the comments for vmParameterAt:[put:]
More information about the Squeak-dev