Remote Runner: Run multiple workers with one image
It is possible for multiple workers to share a single image by detaching the changes file.
This is required, otherwise multiple OS processes would attempt to write to the same file (GlamorousToolkit.changes
) simultaneously, either failing with a write lock, or corrupting the file.
Starting the workers with the flag --detachChangesFromFileSystem
will tell GT to write any changes to an internal, memory only, file.
The size of the internal changes and sources files can be determined with:
| sizes | sizes := Dictionary new. (PharoFilesOpener classVarNamed: #Default) ifNotNil: [ :filesOpener | filesOpener class = PharoLinkFilesOpener ifTrue: [ sizes at: #changes put: (filesOpener instVarNamed: #changesVirtual) originalContents size. sizes at: #sources put: (filesOpener instVarNamed: #sourcesVirtual) originalContents size. ] ]. sizes.