Live data from Hacker News

Writing a Memory Allocator for Fast Serialization

idryman.org

21–23 of 23 posts

Re: Writing a Memory Allocator for Fast Serialization

#21
When I see posts about tuning the OS specific things (like mem allocators, Page size tuning, VMs etc..) , I get the following question (not exactly sure it's the right one):

As there is exponential increase in the in the performance critical software which runs on the dedicated machines, what if we avoid the abstraction of Operating System for them and run using bare minimum, optimized system software?

What if we can pick the specific OS kernel modules + drivers required for our application/ machine needs, tune it for the app and deploy the whole stack (kernel modules + app) as one software?

Example: For a database to work, we need Networking module (accept and send request on a given port), Memory module (to access disk, memory, cache, etc), and Processor handling modules (to create a process/ thread, if we can call that)

Let's say a Dockerfile kind of thing, which specifies all the required modules/ driver for the given software. The modules can be compiled for the architecture and deployed.

Advantages I can see are:

1. Lesser abstraction 2. Full control on scheduling the software. Hence, lesser synchronization issues. 3. Kernel modules optimized for the application software.

All the above three things leads to much better performance.

I see the following problems with the approach:

1. Existing softwares(both user and system) doesn't suite well. 2. Increased development time (as system software needs to be tuned as well). 3. Not so many system software developers.

Isn't that's how the software architecture for the high performance software (which runs the dedicated machines) should be in the first place? Given that we are running so many of them now.

A complete OS (with all the modules and generically coded) looks fine for just the end users who uses variety of not-so-perf critical apps.

What do you think about it?

Re: Writing a Memory Allocator for Fast Serialization

#22

When I see posts about tuning the OS specific things (like mem allocators, Page size tuning, VMs etc..) , I get the following question (not exactly sure it's the right one): As there is exponential increase in the in the performance critical software which runs on the dedicated machines, what if we avoid the abstraction of Operating System for them and run using bare minimum, optimized system software? What if we can…

You've described a unikernel. Check out MirageOS and HaLVM; they're very similar to what you've described.

One interesting thing I've noticed about these kernels is their tendency for full-stack language integration a la Lisp machines and Lisp OSes like Genera. For example, Mirage integrates strongly with programs written in OCaML (the home page describes the project as a "library operating system") and HaLVM with Haskell. A quick search shows unikernels for Golang (Clive) and JS (Runtime.js) as well.

Re: Writing a Memory Allocator for Fast Serialization

#23

When I see posts about tuning the OS specific things (like mem allocators, Page size tuning, VMs etc..) , I get the following question (not exactly sure it's the right one): As there is exponential increase in the in the performance critical software which runs on the dedicated machines, what if we avoid the abstraction of Operating System for them and run using bare minimum, optimized system software? What if we can…

You've described a unikernel. Check out MirageOS and HaLVM; they're very similar to what you've described. One interesting thing I've noticed about these kernels is their tendency for full-stack language integration a la Lisp machines and Lisp OSes like Genera. For example, Mirage integrates strongly with programs written in OCaML (the home page describes the project as a "library operating system") and HaLVM with Ha…

Why do you think unikernels are not famous?

Shouldn't software running on dedicated machines need lesser management (scheduling), abstraction (virtual memory) and finer control (optimized for the architecture) over the hardware?

Post reply on HN