Better HN
topnewbestaskshowjobs
Log inSign up

gighi

288 karma · joined Jan 17, 2014 (12y ago) · 52 submissions

Gianluca Borello

Interested in distributed systems, system programming, performance and scalability.

https://github.com/gianlucaborello

https://www.linkedin.com/in/gborello/

Submissions

comment 9y ago · link · parent

> 1. If one of the two containers caused the issue, then the why you needed both of the containers to produce the issue? Why running just the offending one was not enough?

Running just the offending one would have been clearly enough, since its effects would have caused the same increased latency for every other process in the system (including itself). However, using a second container to observe the performance degradation proves the point that one container is able to affect another one, which is sort of the gist of the article, since too many people think containers provide much more isolation than what in reality happens.

> My guess is that "worker" container requested those non-existent files from a volume mounted by the other container, is it right?

No, the containers didn't share any volume, the dentry cache is effectively a singleton within the kernel, so even if the set of volumes is not overlapping, all processes in the system will see a performance degradation, regardless of where the files being accessed reside.

> 2. Kernel hash table implementation. The whole point of hash table is that it's size is O(N), where N is the number of elements it holds.

Your speculation is correct, however, there are sound reasons for doing such a thing in the kernel (and not allowing the main array of the hash table dynamically expand/shrink), so I wouldn't consider it a bug per se. I'll refer you to this excellent comment: https://news.ycombinator.com/item?id=14660954

comment 9y ago · link · parent

OP here

That's correct, I should have included a chart explicitly measuring the I/O activity done by the two containers, but I can assure you there was literally no I/O activity, a dozen open files per second is a very negligible throughput. The bottleneck was solely in the cache.

comment 9y ago · link · parent

Updated, thanks! I am working with ElasticSearch (ES) more than EL these days and my muscle memory tricked me ;)

comment 9y ago · link · parent

OP here

The solution is very simple: as mentioned in the article, just use a newer kernel and always set memory limits for containers, the blog post is based on an older kernel (2.6.32) that quite a few people irresponsibly still use in containerized environments, mostly because EL6 is so popular among enterprises.

In newer kernels, allocations from object pools are now tied to the limits of the memory cgroups that requested them in userspace, if any, so you wouldn't incur in this specific issue and you would just effectively have a container not being able to use more than X MB of dcache entries (although there are probably other minor ones, for example related to sharing global kernel mutexes and such).

5.

Dynamo: Amazon’s Highly Available Key-Value Store (2007) [pdf](allthingsdistributed.com ↗)

2 points · by gighi · 10y ago · discuss

comment 10y ago · link · parent

Definitely a feasible approach. Let's just say that the reality has a bit more color and we have some other practical advantages in controlling the exact moment when we disconnect a particular client :)

comment 10y ago · link · parent

Yes, every commit gets pulled by jenkins which builds the whole thing, runs unit tests and then starts the deployment once the tests pass.

comment 10y ago · link · parent

Both approaches are reasonable (and there's also a third one, ship your application in containers and replace containers instead of instances).

We update existing instances because in our test environment we deploy at every single new commit (we absolutely love that), and we have hundreds (or more) a day. At that pace, replacing instances would be more time consuming (again, for our specific use case) and less cost efficient.

Plus, updating existing instances is handled automatically by AWS Code Deploy, which provides a very good deploying pipeline that you can control using the aws cli tool.

There are other minor advantages but those are the two main ones.

comment 10y ago · link · parent

We definitely observed such drops that we attributed to presumably internal ELB scaling activity, but they happen so occasionally that for the moment they haven't been a real issue, as opposed to this one described in the article which happened consistently at every deployment in our test environment.

comment 10y ago · link · parent

To be fair, the scenario is less common due to the fact that it happens just when the drained connections are terminated in a certain pattern (as shown in the charts). Still definitely common enough that can be easily replicated and cause real troubles :)

11.

Average SF Tech Wages Up 12.8% to $176K (With Bonuses, Stock Options)(sfist.com ↗)

1 points · by gighi · 10y ago · discuss

12.

Show HN: Cassandradump – Exporting tool for Cassandra inspired from mysqldump(github.com ↗)

1 points · by gighi · 11y ago · discuss

13.

Generate SSH config files from AWS EC2 inventory(github.com ↗)

4 points · by gighi · 11y ago · discuss

14.

The website is down(thewebsiteisdown.com ↗)

2 points · by gighi · 11y ago · discuss

15.

A fast way to SSH into your EC2 instances(github.com ↗)

2 points · by gighi · 11y ago · discuss

16.

My Expected Investment Changes in 2015(rickferri.com ↗)

1 points · by gighi · 11y ago · discuss

17.

Historical Asset Class Returns [pdf](invesco.com ↗)

1 points · by gighi · 11y ago · discuss

18.

Resources Groups and Tagging for AWS(aws.amazon.com ↗)

3 points · by gighi · 11y ago · 1 comment

19.

Google, No Longer the Default Search Engine in Firefox(googlesystem.blogspot.com ↗)

3 points · by gighi · 12y ago · discuss

comment 12y ago · link · parent

The LD_PRELOAD workaround is meant to "fix" the shellshock bug, sysdig doesn't do that, it just passively monitors every injection attempt up to the point where the injected function is actually read by a newly spawn bash.

With the LD_PRELOAD trick you can definitely secure your system, but you won't be able to see if there's a new service that is being used as an attack vector (for your own curiosity). With sysdig, you can, and if you capture a trace file you can also follow the exact process chain that caused the propagation of the environment variable.

comment 12y ago · link · parent

Yes, we most definitely can publish a private brew tap. I'm no expert as I mainly use Linux, but my understanding is that I'd need to create a brand new draios/homebrew-sysdig repo. I'll try to find the time to look into this and update the documentation. If, instead, just a PR to our main repo would suffice, feel free to send it over and we'll merge it in no time :)

comment 12y ago · link · parent

We just released 0.1.89 (special release to include the shellshock chisel) a few hours ago, so distribution maintainers aren't that fast: https://github.com/draios/sysdig/releases

Debian is currently at 0.1.88: https://packages.debian.org/sid/sysdig

And Ubuntu periodically merges all the unstable packages from Debian, so that's why they're lagging one version behind at this moment.

comment 12y ago · link · parent

Yeah, bummer, I can submit a PR to Homebrew but it would take a few hours/days, and we don't ship OSX binaries from Draios, so why don't you go with:

https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-...

Assuming you have a C/C++ compiler installed (comes via XCode) it really takes like 2 minutes.

Lazy alternative, in a couple days maximum Homebrew should be updated, unfortunately it doesn't depend on us.

Also, notice that sysdig for OSX doesn't (yet) have live capture, so you'll just be able to run the chisel on a trace file that you previously created on a Linux host.

comment 12y ago · link · parent

Fair point, even though:

- At this point sysdig is estimated to have tens of thousands of users, and we haven't gotten a kernel bug in a while, with people (us included) regularly using it a lot in production. Of course, I see the irony of mentioning this in a "shellshock" thread

- the dkms packaging should completely hide all the complexities required in maintaining a kernel module

- Part of the kernel code, if you look at the contributors, has been written/reviewed by gregkh, so we like to think the quality is "high enough"

- There might be plans at some point to try and propose a merge of the code to mainline

comment 12y ago · link · parent

What do you get if you run "sysdig --version"?

If you used the official Ubuntu packages, those are a few versions behind upstream (currently at 0.1.87 while we are at 0.1.89): http://packages.ubuntu.com/trusty-backports/sysdig.

What we recommend is uninstalling those ones (sysdig and sysdig-dkms) and just use the binaries that we, Draios, provide, following this: https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-...

Should be very easy, and sysdig --version should show 0.1.89

comment 12y ago · link · parent

I use feedly and this self-hosted application to read all sections of Hacker News: http://gianlucaborello.github.io/rssify/

27.

Show HN: RSS Feeds for HN, Show HN and Ask HN, by Number of Comments or Points(github.com ↗)

1 points · by gighi · 12y ago · discuss

12