Author Archive

TIL gethostbyname*() and gethostbyaddr*() functions are obsolete

It wasn’t obvious to me until I tried to run netcat utility (aka nc) on Ubuntu 10.04 (lucid) release to check Zookeeper’s status: echo “stat” | nc zookeer_server_name 2181 zookeer_server_name: forward host lookup failed: No address associated with name It wouldn’t have been a problem had Zookeeper server used IPv4 address but it was configured […]

Posted on January 28, 2017 at 11:54 am by sergeyt · Permalink · 2 Comments
In: Linux, TIL

jbd2 is munching your disks? Use ftrace to find why.

Have you ever been wondering why jbd2 (or jbd if your are still using ext3) is sitting at the top of iotop and consuming the most of IO bandwidth? Well, it’s certainly not because it’s doing that just to drive you nuts but there is a reason. And the reason is most probably there is […]

Posted on January 27, 2017 at 11:51 am by sergeyt · Permalink · 2 Comments
In: Linux, MongoDB

MongoDB – Defeating RangeDeleter

Not closing a cursor in MongoDB could hurt you big, so it’s generally not recommended to use no_cursor_timeout=True (pymongo3) or timeout=False (pymongo2). Especially when you run shared MongoDB installation: PyMongo does “close” cursors when they are garbage collected, but they aren’t closed immediately and closing a cursor in all current versions of MongoDB is asynchronous. […]

Posted on January 19, 2017 at 7:47 pm by sergeyt · Permalink · Leave a comment
In: MongoDB

Another FreeBSD drop into the Digital Ocean

After several happy years with FreeBSD running in AWS I finally have switched to Digital Ocean. That happened a few days ago and was driven mainly by the lack of the console support which “aws ec2 get-console-output”, in my opinion, is certainly not. After the upgrade to FreeBSD 11 I found my instance unreachable and […]

Posted on November 9, 2016 at 7:30 pm by sergeyt · Permalink · 2 Comments
In: FreeBSD, Life

Turned the page

After 5 exciting and tumultuous years in the enterprise IT as a Unix and SAN engineer it’s time to switch gears and taste something new. Of course, the alley I’m stepping into is not universally novel but for me personally it’s like an uncharted territory and something I could only dream about. The idea for […]

Posted on August 13, 2016 at 11:28 am by sergeyt · Permalink · 4 Comments
In: Life

TIL Common Name (CN) is legacy and subjectAltName must always be used.

Seems I’ve been living under a rock for far too log. From RFC2818: Although the use of the Common Name is existing practice, it is deprecated and Certification Authorities are encouraged to use the dNSName instead. So in today’s world CN is only evaluated when subjectAltName is not present and if it’s set all host […]

Posted on July 6, 2016 at 2:52 pm by sergeyt · Permalink · Leave a comment
In: TIL

Calculating percentile in Python

If you need to find the percentile in Python do that correctly. Which means is by following one of the following receipts: Finding the percentile of the values Use numpy library

Posted on June 29, 2016 at 11:13 pm by sergeyt · Permalink · Leave a comment
In: TIL

Lecture on OpenZFS read and write code paths

If you are interested in ZFS this is the absolute must see video (which is actually a lecture) from Matt Ahrens (one of the two original ZFS creators): Matt Ahrens – Lecture on OpenZFS read and write code paths

Posted on June 19, 2016 at 6:02 pm by sergeyt · Permalink · Leave a comment
In: ZFS

Pair “Listen queue overflow” FreeBSD errors with pcb

Just yesterday, after an upgrade to MySQL 5.7.12, saw plenty of errors were being logged in the system: sonewconn: pcb 0xfffff8006311c870: Listen queue overflow: 151 already in queue awaiting acceptance (1 occurrences) sonewconn: pcb 0xfffff8006311c870: Listen queue overflow: 151 already in queue awaiting acceptance (1 occurrences) sonewconn: pcb 0xfffff8006311c870: Listen queue overflow: 151 already in […]

Posted on May 19, 2016 at 10:40 am by sergeyt · Permalink · Leave a comment
In: FreeBSD

Have stalled snmpd in recvfrom()? Check Recv-Q

Not so while ago I had an issue with a monitoring system that paged about SNMP checks failing on a number of servers. Quick checking here and there (logs, strace, tcpdump, etc.) revealed that snmpd had stalled in recvfrom() without sending a single packet out in response to the constant queries from our monitoring system. […]

Posted on May 14, 2016 at 9:17 pm by sergeyt · Permalink · Leave a comment
In: Linux