[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Memory exhaustion in Mirage
I am following up to share some experience from when I was experimenting with the original mirage switch. I also have a few design suggestions, but maybe they are invalid. I think the problem mentioned in the original mail stems from the way packets are handled by a xen unikernel. Âif you checkÂhttps://github.com/mirage/mirage-net-xen/blob/master/lib/netif.ml on line 300, for each new packet arriving on a VIF, the code will start a thread and ignore the result. As a result, if you start sending lots of packets to a unikernel and the main processing pipeline cannot keep up with the rate, then new packets are allocated and delegated to an handling thread, but these threads will never return and they will create a huge backlog, which at some point will exhaust memory. From a design point of view the best approach to solve this problem, I think, is to create a pool of threads with a fixed size. If the pool doesn't have a free thread, then the packet is dropped. Alternatively, the driver can be redesigned to create backpressure to the netback and force packets to drop in the Dom0, instead of the unikernel, and thus reduce a bit the cpu load. In the past I tried to rewrite the rx_poll method, But the problem is that the function that is passed  as a handler to ack new pages from the netback is not lwt aware, thus you cannot easily integrate some of the lwt asyncronicity in the processing pipeline. On 20 December 2014 at 00:11, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote: The actual definition of these functions is probably in the mirage/mirage-platform repository at the moment. Look in the xen/ subdirectory and grep for the C file that contains it. Charalampos Rotsos
PhD student The University of Cambridge Computer Laboratory William Gates Building JJ Thomson Avenue Cambridge CB3 0FD Phone: +44-(0) 1223 767032 Email: cr409@xxxxxxxxxxxx _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |