News for hackers. Stuff that matters.
Re:Abusing Privileged and Unprivileged Linux Containers by sillysaurus3 on Wednesday June 01, 2016 @07:00PM (#11818976)
This is going to sound amusing at best, but would you clarify what it means to boot?

To justify the question a bit: booting traditionally meant physically turning a system on. The boot time included BIOS initialization, a concept now blurred by the advent of virtualization.

150ms is such an absurdly short amount of time that I'm left wondering what booting is in this context.

Re:Abusing Privileged and Unprivileged Linux Containers by wmf on Wednesday June 01, 2016 @10:58PM (#11820072)
VMs usually do have BIOS (sometimes you can see it flicker on the screen) but like NeutronBoy said, the hypervisor just creates the virtual hardware devices in a pre-initialized state so the BIOS has to do almost no work and it completes in a fraction of a second. Clear Containers boots even faster by not using BIOS; the hypervisor directly loads the kernel and initrd into RAM. So in this case "booting" means starting the kernel, mounting the root filesystem (accelerated using DAX), running init, starting dockerd, etc.
Re:Abusing Privileged and Unprivileged Linux Containers by rwmj on Thursday June 02, 2016 @03:56AM (#11821007)
Actually Clear Containers does have a BIOS, because Linux requires one eg to read E820 data and to set up the virtual video. However the one Clear Containers uses (from kvmtool) is extremely minimal -- it's literally enough of a BIOS just to answer the int calls that modern Linux makes at boot and that's all. IIRC it's hundreds of lines of code only.
Re:Abusing Privileged and Unprivileged Linux Containers by mikewhy on Wednesday June 01, 2016 @08:09PM (#11819376)
> 150ms is such an absurdly short amount of time that I'm left wondering what booting is in this context.

Clear Linux was announced about a year ago, and it does boot absurdly quickly

https://clearlinux.org

https://lwn.net/Articles/644675/

Re:Abusing Privileged and Unprivileged Linux Containers by philips on Wednesday June 01, 2016 @09:41PM (#11819773)
It does this thanks to a technology called DAX and the fact that systemd boots really fast.

https://www.kernel.org/doc/Documentation/filesystems/dax.txt

Re:Abusing Privileged and Unprivileged Linux Containers by rwmj on Thursday June 02, 2016 @03:57AM (#11821009)
DAX is a small part of it, but Intel made many changes throughout the stack, mostly to the Linux kernel.
Re:Abusing Privileged and Unprivileged Linux Containers by NeutronBoy on Wednesday June 01, 2016 @07:25PM (#11819143)
> This is going to sound amusing at best, but would you mind defining what it means to boot?

I imagine that most of the time would be in mocking some/all of the hardware interfaces to present to the VM, and running your init processes (and all that entails for whatever OS you're running).

Re:Abusing Privileged and Unprivileged Linux Containers by e12e on Thursday June 02, 2016 @07:07AM (#11821592)
For perspective, I just timed (not very well) how long it takes windows to run the c-program "exit": "int main() { return 0; }", compiled with gcc 4.8.1, -O3 -std=c11 -Wall, stripped[1]. From a warm disc cache it takes ~3ms. From cold(er) it takes ~19s.

Taking a 50x hit to run "exit" from a container doesn't sound bad, but it doesn't sound all that far fetched either.

[1] time util from pstools, as installed by scoop.sh - similar to why gcc (not eg msvc - it's all in my path atm, no work needed :)

Re:Abusing Privileged and Unprivileged Linux Containers by e12e on Thursday June 02, 2016 @02:28PM (#11824893)
~19ms, obviously, not 19 seconds.