On Wed, Nov 15, 2017 at 5:21 AM, Waldek Kozaczuk <jwkozac...@gmail.com> wrote:
> A better solution could be to not have a read-write ramdisk at all, but > rather a simple read-only filesystem on the disk image where we only read > file blocks as they are needed, and also cache them somehow for the next > reads. > >> >> This is what the proposed patches were about >> https://github.com/cloudius-systems/osv/pull/646 (which you already >> found). I reviewed those patches in this thread: >> https://groups.google.com/forum/#!searchin/osv-dev/readonly/ >> osv-dev/DYSH4_NqyMg/YFJxM9NKBgAJ >> >> James Root came in that thread back with a new patch, but sadly it >> appears that nobody ever reviewed it, and James never complained about >> forgetting this code. >> At this point I don't really remember if there was anything wrong in >> Jame's last patch - it might be in good working order and you can try it >> (and patch the build script to use it instead of ramfs). >> >> If you're interested in reviving it, it might be very close to being >> complete! >> > > I am definitely interested and I will give it a try. Is there any existing > performance test suite that I could use to test its performance? What would > be the things to measure (speed, etc?) and observe (memory utilization?)? > No, I don't think we have any organized test suite. I'd try to observe the boot time of a large program (e.g., some Java application), the memory it needs (e.g., you can run "scripts/run.py -m1000M" and reduce the size until you can't reduce it any more), and also check that the amount of disk IO (perhaps via iostat in the host or some internal OSv tracepoint count) it does to run some workload. > >> > Also even though most of the files in stateless apps do not change there > is always a need to write to some log files. I guess for that I could use > the ramfs but probably improve its write implementation by using some kind > of linked list (*std::deque) *of fixed side memory blocks to store data > so we do not constantly free/malloc per Justin's recommendations. Do you > have any other recommendations? > Yes, you can have the root filesystem ("/") on some read-only filesystem, but additionally mount a read-write filesystem, like ramfs, on /tmp or /var/log or whatever (of course, it's questionable why you'd want to write there if it's not persistant, but it will be easier if this is allowed for applications that can't be changed to log over the network, etc.). It should indeed be fairly easy to fix the ramfs append - see https://github.com/cloudius-systems/osv/issues/884 https://github.com/cloudius-systems/osv/issues/739 is also about a different /tmp filesystem. Nadav. -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.