He found that the more HTTP client requests he did, the more memory his Node process would consume, but it was really slow.
[...] Then I ran Node with UMEM_DEBUG set to record various important information about the memory allocations
[...] Every hour, it grabbed the output of pmap -x and a core file and stored those in Joyent Manta
[...] In MDB there's a particularly helpful command ::findleaks that will show you the memory addresses and the stack traces for leaked memory, not unlike using valgrind, but without all the performance penalty.
[...] At this point we knew that we were looking for something in v0.10 that called MakeCallback but that didn't first have a HandleScope on the stack. I then worked up this simple DTrace script.
In this post, we will explore how Unix pipes are implemented in Linux by iteratively optimizing a test program that writes and reads data through a pipe.1
We will begin with a simple program with a throughput of around 3.5GiB/s, and improve its performance twentyfold.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
how fast is qsort when it comes to sorting integers and can we do better?
SOURCE: http://taint.org
an entertaining dive down a low-level performance-optimization rabbit hole, diving into radix sort on an array of integers in particular
tl;dr:
- To stay fast, only load JavaScript needed for the current page. Prioritize what a user will need and lazy-load the rest with code-splitting.
- Embrace performance budgets and learn to live within them. For mobile, aim for a JS budget of < 170KB minified/compressed. Budgets are critical to success, however, they can’t magically fix perf in isolation. Team culture, structure and enforcement matter.
- Learn how to audit and trim your JavaScript bundles. There’s a high chance you’re shipping full-libraries when you only need a fraction
- Every interaction is the start of a new ‘Time-to-Interactive’; consider optimizations in this context. Transmission size is critical for low-end mobile networks and JavaScript parse time for CPU-bound devices.
- If client-side JavaScript isn’t benefiting the user-experience, ask yourself if it’s really necessary
airspeed velocity is designed to benchmark a single project over its lifetime using a given set of benchmarks – i.e., little snippets of code that are timed
the result data is stored in JSON files alongside the benchmark suite and may grow quite large, and you may want to plan where to store it.
The USE Method provides a strategy for performing a complete check of system health, identifying common bottlenecks and errors. For each system resource, metrics for utilization, saturation and errors are identified and checked. Any issues discovered are then investigated using further strategies.
This is an example USE-based metric list for Linux operating systems (eg, Ubuntu, CentOS, Fedora). This is primarily intended for system administrators of the physical systems, who are using command line tools. Some of these metrics can be found in remote monitoring tools.
I often hear people who are happy because PyPy makes their code 2 times faster or so. Here is a short personal story which shows PyPy can go well beyond that.
3v4l.org (leetspeak for eval) is an online shell that allows you to run your code on my server.
Output from all released PHP and HHVM versions
Performance (time and memory) of every version
The thing I learned last week that helped me really understand was – you can split linux tracing systems into
- data sources (where the tracing data comes from)
- mechanisms for collecting data for those sources (like “ftrace”)
- tracing frontends (the tool you actually interact with to collect/analyse data)
CPU utilization has become a deeply misleading metric: it includes cycles waiting on main memory, which can dominate modern workloads.
A summary of Linux profiling/monitoring tools