jedi4ever / veewee

Easing the building of vagrant boxes
MIT License
4.29k stars 779 forks source link

Current Ubuntu 14.04 uses kernel with degraded disk performance in SMP environment #1015

Closed mfn closed 4 years ago

mfn commented 9 years ago

Not sure if this can be considered as a bug per se, but here's a heads up anyway.

I discovered that the Ubuntu Server 14.04 amd64 ISO image currently used by the template ( https://github.com/jedi4ever/veewee/blob/8a4323471a6a4705799b3920ab01519c65dd55b7/templates/ubuntu-14.04-server-amd64/definition.rb#L9 ) uses a kernel which is compiled with the CONFIG_CONTEXT_TRACKING_FORCE set to y.

This leads to the following disk performance degraded in SMP environments (i.e. more than one CPU):

vagrant@ubuntu-14:~$ dd if=/dev/zero of=bigfile bs=1024 count=5000000
5000000+0 records in
5000000+0 records out
5120000000 bytes (5.1 GB) copied, 46.6511 s, 110 MB/s

For comparison, a kernel which has this flag disabled/removed (and uses multiple CPUs):

vagrant@ubuntu-14:~$ dd if=/dev/zero of=bigfile bs=1024 count=5000000
5000000+0 records in
5000000+0 records out
5120000000 bytes (5.1 GB) copied, 10.4548 s, 490 MB/s

Took me a while to figure this out, here are the resources I used to figure thus out:

YMMV

mpapis commented 9 years ago

So this is a bug in Ubuntu and it's being addressed? We could wait and it would be fixed with time? is there better image we could use - I understand we use the official releases.

mfn commented 9 years ago

So this is a bug in Ubuntu and it's being addressed?

As far as I understand it, yes. Ubuntu bug 1349028 states: status: Fix Committed → Fix Released

We could wait and it would be fixed with time?

I think; however, as an example, the currently referenced ISO image http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso is already an older one, 14.04.1 already exists -> http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso . But this one still has the problematic flag enabled.

is there better image we could use

I don't know. For now I'm using the vagrantcloud Ubunty trusty images as they've a newer kernel version which doesn't exhibit the problem.

I'm not expert on this topic. The veewee definition could recompile the kernel or install a newer or ... not sure if these things are overkill; though.

For example, my SSD and machine seems pretty well (natively) and a reduced throughput of 100MB/s may not be a problem for everyone (not sure how the whole output would be if the basic system is already slower).

Maybe there's nothing to do at all until there are new released images. One of my intentions with opening this issue was to raise it so it becomes more known and saves other the time I had to dig into it ;)

cheers

mpapis commented 9 years ago

ok then, we can update the image version when the update comes out, is there a way to monitor http://releases.ubuntu.com/14.04/ for new revisions of images?

braddeicide commented 9 years ago

Aren't updates applied during the build? if not then that's trivial to enable, it may not be what everyone wants in the default build however.

if it's not even available as an update it's beyond the veewee projects scope.

mpapis commented 9 years ago

when I build new templates I tend to skip updates, it takes place on the image and tends to be outdated pretty soon, I assume the updates should be ran by the user when grabbing image

darkn3rd commented 7 years ago

Would sudo apt-get dist-upgrade resolve this?

Also, FYI, found this: http://cateee.net/lkddb/web-lkddb/CONTEXT_TRACKING_FORCE.html

mfn commented 7 years ago

¯\_(ツ)_/¯

I moved on and am now using https://github.com/chef/bento . Over the past two years, in my experience, this was the most reliable (and easiest) way to build generic as well as specialized boxes.

mfn commented 4 years ago

Closing, as this issue isn't relevant to me anymore (not using 14.04)