izard: (Default)
I just published a short article that includes a link to a 7KB tool that I am now releasing as open source. It simply tries to guess which [Intel server] CPU it is running on, so that when it runs in a virtual machine that hides a real CPUID you can still run a binary compiled for the optimal instruction set.
izard: (Default)
#!/bin/bash
if crashes.x >/dev/null 2>&1 | exit $? ;
then
 echo Not crashed
else
 echo Crashed
fi

if crashes.x SIGSEGVs, the script above sometimes prints "Not crashed", and sometimes "Crashed". (I need a pipe hack because simply redirecting to null does not prevent error message on a console).

Strange, where this non-determinism could come from?
izard: (Default)
100GFLOPS in 1 Watt :), connected to a core m3 compute stick..

Just received today, this weekend I'll be installing dev env and maybe firmware upgrades if it works the same way as any other Intel dev platform.
izard: (Default)
I am not getting clojure zip, that is so sad. Here is a trivial function:

REPL> (def atree (list 1 2 3 (list 4 5) (list 6)))
REPL> (rm-from-tree atree 10)
(1 2 3 (4 5) (6))
REPL> (rm-from-tree atree 3)
(1 2 (4 5) (6))
REPL> (rm-from-tree atree 5)
(1 2 3 (4) (6))
So far, so good.
Now:
REPL> (rm-from-tree atree 6)
NullPointerException clojure.core/with-meta--4375 (core.clj:218)

WTF??

Upd: works fine if I replace list with vector.. WTF??!!1111
izard: (Default)
Very spectacular thread on gizmodo. A google's s/w engineer writes a long and boring piece about inclusion and positive discrimination. The original text is so perfectly crafted internet troll bait, that I am 100% certain he was dead serious. Comments and responses are great, I especially liked this one: "if you were in my reporting chain, You would have ... a much smaller meeting, including you, me, your manager, your HRBP, and someone from legal. And it would have ended with you being escorted from the building by security and told that your personal items will be mailed to you."

This all reminds me left dissidents in late USSR, who were trying to start an open theoretical discussion about a paths to communism in a Soviet Union.

Upd: As expected, they fired the guy.
izard: (Default)
Finally, live feed from Skylake-SP launch. Yes, it does not have SHA-NI, but it is the biggest improvement in u-arch since Nehalem.

Bugz

Jul. 11th, 2017 12:20 pm
izard: (Default)
The worst kind of bugs - 3rd party libs dependencies..
On a fresh Fedora 26 install on one of my test servers, one of the tools I needed wanted to install some gtk and gdk dev libs.
# yum install ...
"you are about to install a ton of deps, tolal 100Mb" Y/n
Y
"done"
A tool works.
Now I need to install a kernel src package:
# yum install ...
File "/bin/yum", line 57, in
from dnf.yum import main
...
ImportError: /usr/lib64/python3.6/site-packages/rpm/_rpm.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PySlice_AdjustIndices
Previous installs broke yum!

Very cool: I can't even google PySlice_AdjustIndices, and PySlice library simply does not have AdjustIndice method in 3.6.0, only SetIndices...

Of course I don't care to debug deeper (or file bugs with Fedora), it is just easier to re-install.
izard: (Default)
I have to admit that I was wrong - when I first read about roofline model several years ago I thought it is too abstract to be used in a real s/w performance work.

It is not, and Intel Advisor tool that visualizes loops in roofline model actually more makes sense than I thought.
izard: (Default)
Yesterday Akhilesh Kumar, the Skylake-SP CPU architect announced mesh architecture for future Xeon CPU,

that replaces ring. The ring was there in Xeon for 6 generations, and once the server CPU has grown from 4 to 20+ cores, latency of the ring became an important factor to consider in software performance work. In last 4 architectures, there were even sub-rings (Cluster-on-Die) to address this. Some folks were reverse-engineering a secret (though simple) hash function that directed different cache lines to different chunks of last level cache.

No need any more. That is just one of great features in the upcoming CPU.

work stuff

May. 22nd, 2017 04:19 pm
izard: (Default)
1. Looks like openvswitch constantly monitors PMUs, so it is difficult to monitor it's performance externally :(
2. I was asked to explain why sharing workload to 2 cores with 80% utilization was equivalent to sharing it to 6 cores with 40% utilization. Kinda funny, shouldn't it be obvious?

O(n^3)!

Apr. 20th, 2017 09:59 am
izard: (Default)
Here is the code for the previous post

I should have wrote this code in the first place, took me only 5 minutes anyway. [personal profile] spamsink was right: apparently in runs in slightly below O(n^2).

But my proof of O(n^3) still stands, and I found a German university computer science textbook that also proves it should be O(n^3) in the worst case... Riddles!
izard: (Default)
Those interview questions... I am not fond of computer science riddles, but some are.

I am reasoning about Welzel's algorithm complexity:
(to find a minimal bounding circle over set of points P, there is a recursive algorithm:
circle mbcr(P[n], R)
if |P| = 0 or |R| = 3
return get_circle(R)
if (P[0] in mbcr(P-P[0], R))
return mbcr(P-P[0], R)
return mbcr(P-P[0], R+P[0])

In a textbook, they say complexity is ϴ(n) for average case and O(n^2) in worst case..

I am getting different values. Lets assume worst case, when "if (P[0] in mbcr(P-P[0], R))" is always false.
mbcr(n, |R|=3) = O(1) - obviously.
mbcr(n, |R|=2) = O(n) - n * first recursion point, and each time it gets only once to second recursion point (which is mbcr(n, |R|=3) case).
mbcr(n, |R|=1) = O(n^2) - T(mbcr(n, |R|=1)) = O(n) + (n-1) * T(n-1, |R|=2)) = O(n + n^2) = O(n^2)
mbcr(n) = O(n^3) - T(mbcr(n)) = O(n) + (n-1) * (T(mbcr(n-1,|R|=1)) = O(n) + O(n^3) = O(n^3)

What am I missing?? Everything above seems very clear for me, can't stop thinking about this simple problem.
izard: (Default)
I think today was the first time I seen this message in a terminal:
# ssh $IP
do_ypcall: clnt_cal: RPC: Time out
You don't exist, go away!
#

Good sense of humor, guys!
izard: (Default)
Of course, I could not make it without a computer. But I did not want to use a laptop or smartphone, so I took this device.

It is an Intel compute stick, and first I thought it is pretty useless, so I did not buy it when it came out. But then I won it in a draw, and found a good use: every hotel room I stay in has a big screen digital TV that I never switched on until now. The device is powerful enough to run heavy photo processing software, so I edited my pics in the evenings.

How it helped internet detox? During one week, I did not read LJ friend feed, only checked facebook once, only checked work email twice, read only 5 articles on habrahabr, and read only about 10 pages of junk books. That is less than 5% of traffic I typically consume, so I feel almost sober now :)
izard: (Default)
For many many years, I keep seeing this job ad in linkedin emails.

It comes out every couple of months, and it goes on for more than 5 years I think. Sometimes it disappears for a while, and then it is back after ~6 months (probation period? ;)

So please someone qualified, do apply!
izard: (Default)
Maybe I should not call myself "s/w developer" anymore. Recently when I introduce myself, the first question is whether I am in backend or frontend development.

If I tell that I am in neither, they tell: "cool, bro, so you are fullstack dev?"

Only advanced folks recognize other areas, like in embedded or gamedev, but lamost nobody knows about likes of telco, fintech, HPC.

Did I miss a paradigm shift - I guess now 90% of programmers are web developers, right?
izard: (Default)
Just met a colleague, who came up with a great idea about a new product. The idea is absolutely fabulous: it is a true technical innovation that makes a perfect business sense, and is an extremely elegant solution.

Now, how to implement it in a big organization? My colleague comes to a development group, and advocates for allocating resources to build the project. Everyone sees the idea is great, so the only question is: is there a market demand, let's get a pilot customer first. So he comes to a prospective customer and customer tells: it is great, is there a product available soon?

As it is just 2 parties, it is not a catch-22 deadlock, but a nice project start. Good luck, !
izard: (Default)
Echo just started shipping in Germany, and I am among the first customers. My main reason to buy echo dot was to try out SDK, but here are teh bugz:

1. "Sorry you can't join housholds with Julia, because Germany and Germany are different countries, and you have to be in the same country with your spouse to join housholds." (reported, waiting for resolution)
2. To use intents (and thus SDK) you have to change your language to "German" Intents are not supported with English! (What?? To develop for Amazon Alexa, I have to speak German?? Can I just show her my B1 results and then switch to English, please?)
izard: (Default)
On Friday I was given an urgent task: I'll have to find a solution or at least a root cause of a performance problem reported by a customer, by the end of 2016.

The issue to investigate sounded extremely familiar: a micro-benchmark runs for 100us on micro-arch A and B, and for 100-200us on micro-arch C, everything else being equal. We want a design on C, performance between A, B and C are similar, what brings the difference?

In my Christmas/New Year case I was lucky and it was merely an SMI.

The very first thing to check is always to read MSR 0x34 that counts SMIs before and after u-benchmark. It is not the most common source of such issues, but easiest to check, and not difficult to fix, if you have 100% control over the platform.
izard: (Default)
From time to time I buy a UK edition of Wired magazine. It is so much like Компьютерра in late 90s-early 2000th!

Not anymore. Now there is a German version available, so all shops here stopped selling a UK version. Same happened with Maker magazine few months ago..
Page generated Sep. 20th, 2017 12:26 am
Powered by Dreamwidth Studios