[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] On unikernel size
Hi Wassim, It's definitely possible to get the image size of MirageOS builds down from where they are right now. As background, there are two ways to build unikernel images: - Native code compilation: this generates fast x86_64/ARM unikernels that link against the OCaml 'libasmrun' runtime to run as native executables. In this mode, touching a single module will link the whole thing in, even if only one function is used. Thus, as modules grow, the hello world library size also grows. - Bytecode compilation: this generates portable bytecode that is interpreted by the 'ocamlrun' or 'libcamlrun' runtime. There exists a utility called 'ocamlclean' that does dead-code elimination that eliminates all unused functions: https://github.com/avsm/ocamlclean. This is how we got our sub-300k unikernels for DNS. Now, we need to do a little work to get these back. Either a native code ocamlclean, or add a bytecode backend to the latest MirageOS (which is native code only). I suspect the easiest path is to build the bytecode backend in again, and then get ocamlclean working with the latest OCaml (shouldnt be hard), and then investigate a native code ocamlclean as a Pioneer Project. regards, Anil > On 18 Nov 2015, at 23:05, Amir Chaudhry <amc79@xxxxxxxxx> wrote: > > Hello Wassim, > > There are likely further things that can be done to reduce image size but Iâm > not sure of the status of that work. It might be time to revisit some of > that to see where it stands. > > If you add an agenda item to the next MirageOS call (and join the call too) > [1], then we can remember to discuss it! > > [1] https://github.com/mirage/mirage-www/wiki/Call-Agenda > > Best wishes, > Amir > >> On 13 Nov 2015, at 22:05, Wassim Haddad <wmhaddad@xxxxxxxxx> wrote: >> >> Dear colleagues, >> >> A question please about the size of unikernel images: >> >> I built mirage console "hello world" and the stripped disk image size is 3.2 >> MBytes. The runtime memory required to run the image is ~ 9 MBytes. Is it >> possible to reduce futher the memory footprint? >> >> >> Thanks much! >> >> Wassim H. >> _______________________________________________ >> MirageOS-devel mailing list >> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx >> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel > > > _______________________________________________ > MirageOS-devel mailing list > MirageOS-devel@xxxxxxxxxxxxxxxxxxxx > http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel _______________________________________________ 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 |