google-code-export / go-susi

Automatically exported from code.google.com/p/go-susi
GNU General Public License v2.0
1 stars 0 forks source link

Memory overflow with concurrent TFTP requests #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When 100 clients request the initrd via TFTP at the same time, this causes 
20MB*100 = 2000MB memory allocation => OOM.

Original issue reported on code.google.com by mux2...@gmail.com on 9 Jul 2013 at 2:32

GoogleCodeExporter commented 9 years ago
To fix: Implement a synchronized cache that prevents the same file from being 
read into memory multiple times. Because the files being served by go-susi 
rarely change, it is okay to simply keep them alive in the cache for a while 
without checking the disk for changes. The lifetime should be extended for 
every access of the file, so that 100 machines that boot in 10s intervals will 
only cause a single read of e.g. pxelinux.0 from disk, even though the whole 
process takes 1000s. There's probably no point in implementing a maximum 
lifetime. Ordinarily when PXE boot files are replaced, go-susi will be 
restarted anyway as part of the update process.

Original comment by mux2...@gmail.com on 9 Jul 2013 at 2:41

GoogleCodeExporter commented 9 years ago
Fixed in 25a7605822f1

Original comment by mux2...@gmail.com on 9 Jul 2013 at 5:23