In this article I am going to share with you an interesting case of how an optional feature makes a software library completely unusable on non-AMD64 hardware.
The software library is Apache Parquet.
Apache Parquet is a columnar storage format available to any project in the Hadoop ecosystem, regardless of the choice of data processing framework, data model or programming language.
While storing data Parquet may use compression to reduce the size on the disk. The list of supported compression formats are listed at parquet.thrift — Snappy, Gzip, LZO, Brotli, LZ4 and ZSTD.
From the website:
Concourse is an open-source continuous thing-doer.
Built on the simple mechanics of resources, tasks, and jobs, Concourse presents a general approach to automation that makes it great for CI/CD.
ConcourseCI is a light-weight continuous integration/deployment server. It is written in Golang and is maintained by a team at Pivotal/VMWare.
There are many CI/CD solutions out there but not all of them support ARM64 CPU architecture. And CouncourseCI is one of them! The latest version at the moment provides only AMD64 binaries for Linux, MacOS and Windows. There is an open issue since July 2017. …
Do you know how your software processes network calls ?
Unless you use a low level programming language you most probably didn’t need to care about such details. If you are a web developer then most probably you just start Apache Tomcat or Netty server and let them do the low level work, while your code deals with the application business logic (high level work). To squeeze as much performance of your OS and hardware as possible Netty itself implements the plumbing with the OS network stack in its native transport implementations. But Apache Tomcat and almost any other JVM…
Lately with the big progress of GraalVM development many JVM web frameworks started suggesting to compile our applications to native binaries (for Linux, MacOS or Windows).
In this article I am going to explore whether this gives us any advantages.
Recently I’ve shared an article comparing the performance of several HTTP2 web servers. For the purpose of this article I am going to create a native image of the embedded Apache Tomcat application and see whether this is going to improve the results.
The first step is to download and install GraalVM.
There are Linux x86_64 and aarch64 distributions for…
Recently there were few questions/complains about performance of HTTP2 support in Apache Tomcat web server. So I’ve decided to check for myself and see what could be improved!
To enable HTTP2 support in Apache Tomcat one should just add
<UpgradeProtocol className=”org.apache.coyote.http2.Http2Protocol” />
to a Connector. Here is a more complete Connector config:
The web browsers support HTTP2 only over TLS encrypted connection! That’s the reason for the SSLHostConfig.
If you don’t specify <SSLHostConfig> then Tomcat will enable HTTP2 over clear text — the so called h2c
. But h2c can be consumed only with non-browser http clients.
What is Varnish Cache ?
From project’s Wiki page:
Varnish is very flexible and as such can be used as a caching engine , a load balancer , a web application firewall, an edge authentication and authorization mechanism. Other use cases are HTTP routing, hotlinking protection, DDoS attack defender and, a lot, more.
Varnish is a reverse-proxy HTTP accelerator designed for heavily consumed API endpoints and also for dynamic, heavy-content, high-traffic websites.
From Wikipedia:
Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs
To compare its performance I am going to use it as…
HAProxy 2.2 has been released few days ago so I’ve decided to run my load tests against it on my x86_64 and aarch64 VMs:
Note: the VMs are as close as possible in their hardware capabilities — same type and amount of RAM, same disks, network cards and bandwidth. Also the CPUs are as similar as possible but there are some differences
Both VMs run Ubuntu 20.04 …
While profiling Apache Tomcat trying to figure out why the request throughput under very high load is twice better on x86_64 than on aarch64 CPU architecture I’ve noticed that there is a high thread contention when using org.apache.tomcat.util.collections.SynchronizedQueue and org.apache.tomcat.util.collections.SynchronizedStack.
Executing Async-Profiler’s
./profiler.sh -e lock -d 60 <TOMCAT_PID>
gave me the following output:
Started [lock] profiling --- Execution profile --- Total samples : 713834 Frame buffer usage : 0.0288% --- 1106165618177 ns (58.97%), 395609 samples [ 0] org.apache.tomcat.util.collections.SynchronizedStack [ 1] org.apache.tomcat.util.collections.SynchronizedStack.push [ 2] org.apache.tomcat.util.net.NioBlockingSelector.write [ 3] org.apache.tomcat.util.net.NioSelectorPool.write [ 4] org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite [ 5] org.apache.tomcat.util.net.SocketWrapperBase.doWrite [ 6] org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking [ 7] org.apache.tomcat.util.net.SocketWrapperBase.flush […
java.text.SimpleDateFormat is a well known utility used by Java developers for formatting and parsing dates. It is available since the early versions of Java, most probably since version 1.0.
Its API is simple and intuitive
SimpleDateFormat formatter = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");String formatted = formatter.format(new java.util.Date());Date date = formatter.parse("Wed, 4 Jul 2001 12:08:56 -0700");
but it has drawbacks. Here are few of them:
Last week I’ve shared with you the results of load testing Apache Tomcat on x86_64 and ARM64 CPU architecture. In this article I will test Memcached.
What is Memcached ?
From Wikipedia: Memcached is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.
In contrast to Apache Tomcat which is written in Java and thus is multi-platform Memcached is written in C and one needs to build it…