On Tuesday, 28.04.2015 at 16:51, Antti Kantee wrote: > So what was the problem? It was somewhat of a configuration > problem. nginx was writing access.log to /tmp. By default, /tmp is > rumpfs. rumpfs is the simplest, most barebones viable file system > driver. It does not even allocate files in blocks, just as a > continuous slice of memory: > > http://nxr.netbsd.org/xref/src/sys/rump/librump/rumpvfs/rumpfs.c#1418 > > Yea, I guess I don't have to go into detail on why that causes > exponential slowdown and eventually causes meltdown.
:-) I've started using "access_log /dev/null" in my nginx configuration. At least for benchmarking that should eliminate any potential time spent writing out access logs, especially with the full OS domUs where /tmp is not necessarily a tmpfs (<mumble> systemd on Debian does not parse the existing /etc/default/tmpfs <grumble>) > So, I made rumprun_boot() mount a 1MB tmpfs on /tmp by default. The > tmpfs driver is multiple times the size of rumpfs, but the rumprun > unikernel isn't really a _minimal_ rump kernel environment, so we > can splurge a bit. That said, a 1MB access log fills up pretty > fast, but for any serious access.log-like business we should offer > file-based storage anyway. File-based, or possibly forwarding via a stub syslogs to $ELSEWHERE. > I think I'll make the rootfs (rumpfs) permissions something else > than 0777 by default. That will at least make it impossible for > programs not running as "root" to accidentally write to inopportune > locations. Good idea.
