mbenkmann / limux-gosa

GOsa² is a web based adminstration tool for user accounts, groups, servers, clients, and many other things.
18 stars 5 forks source link

Memory overflow with concurrent TFTP requests #133

Closed mbenkmann closed 9 years ago

mbenkmann commented 9 years ago

From mux2...@gmail.com on July 09, 2013 16:32:22

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

Original issue: http://code.google.com/p/go-susi/issues/detail?id=133

mbenkmann commented 9 years ago

From mux2...@gmail.com on July 09, 2013 07:41:39

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.

mbenkmann commented 9 years ago

From mux2...@gmail.com on July 09, 2013 10:23:30

Fixed in 25a7605822f1

Status: Done