Running Nextcloud, ARM server can provide 40% performance per dollar uplift

ARM is a relatively new player in the server market. One implementation using their IP is the Cavium ThunderX, a system designed for massive parallel applications. This ARM based hardware is available on bare-metal cloud providers like Packet which is what we used to assess the performance running Nextcloud. Nextcloud, by its nature, scales extremely well across multiple cores and our tests show up to 50% better performance than a similarly priced Intel system.

ARM in the server market

ARM, a British company calling itself “The Architects of Tomorrow”, has some 5,000 employees, making it a tiny blip on the radar in the tech world. Yet its technology reaches 80% of the global population and 100 billion (yes, with a b!) ARM based chips have shipped already. This is due to their business model: Unlike Intel, they only provide their core designs to third parties which design and produce full chips.

From small to big: the server market!

These can be micro-controllers for hard drives as used by Western Digital, up to custom-designed, desktop-class CPU’s as used by Apple in their iPad Pro devices.

Over the last years, ARM has started to make inroads in the server market. Several vendors have started to produce hardware, one being the Cavium ThunderX. This SoC (System-on-Chip) offers 96 ARMv8 (64bit) cores and at Packet can be used priced at a mere $.50 per hour.

We compared its performance to an similarly priced Intel, the Type 1E, 8 threads on 4 Intel E3-1578L cores with 32G memory at the same $0.50 per hour.

Analysis

The two systems follow a vastly different approach to computing. The Intel contains 4 very powerful, dual-threaded cores, offering a performance for single-threaded applications nearly unparalleled in the market. However, this comes at a price: The cores are big and power hungry.

Running Nextcloud, ARM server can provide 40% performance per dollar uplift

tracking resource usage for each CPU, pictured with 30, 75 and 100 threads

A work load which efficiently scales over large numbers of cores, on the other hand, would derive great benefit from the approach of the Cadvium ThunderX, which offers no less than 96 small cores. Each might be nimble, but together they can put up quite a show as our results show.

Nextcloud scaling

Nextcloud is designed to scale nearly perfect across large numbers of independent cores. Each request to a Nextcloud server is handled by a new, fresh and independent PHP process which can run on its own CPU or even on its own server – yes, a cluster of Raspberry Pi systems has been done!

Of course, there are bottlenecks in the infrastructure around Nextcloud, including its usage of a database (MySQL for example scales badly beyond 4-8 cores) and storage. For this reason, we designed our Global Scale architecture for user installations ranging in the tens to hundreds of millions.

Platform

We used a standard Ubuntu 16.04 installation and the same configuration on both the Intel and ARM system. Our goal was to assess the performance of the Nextcloud application itself, eliminating network, I/O, RAM, database, storage and caching performance from the equation. In a real-world, large-scale Nextcloud installation, database, caching and storage tend to run on their own, optimized servers but such a setup would make benchmarking harder as it suffers from unpredictable network latencies.

We thus did local benchmarking, using a simple ‘PROPFIND’ command without actual up- and downloading. Mid-sized installations around the 30.000 user mark like at the TU Berlin show this represents around 80-90% of the load on the system, making this a very valid benchmark.

We employed Apache with PHP 7, setting up Apache to use Prefork and modphp. As database we used SQLite as this can, for these simple read-only commands, provide nearly unlimited scalability.

We tested using Apachebench with 100.000 requests, trying an increasing number of parallel requests. We ran all benchmarks twice and averaged the results, recording both the 99% serve time in milliseconds and the number of requests per second.

Example command we ran:
ab -n 100000 -c 500 -m PROPFIND http:///nextcloud/remote.php/webdav/

We used monitoring tools to ensure no bottlenecks. For example, RAM usage never exceeded roughly 8 gigabyte. Our goal was to saturate the CPU cores as much as possible, without undue load on other elements of the system.

Results

In the graphs we show the 99% serve time (how long it takes to serve 99% of the requests, an indication of how long an individual user might end up having to wait for a response) and the total number of requests per second handled by the server, showing the absolute capacity of the server at this level of parallel requests.

Running Nextcloud, ARM server can provide 40% performance per dollar uplift

Latency vs concurrency

Running Nextcloud, ARM server can provide 40% performance per dollar uplift

Requests/sec vs concurrency

As the Intel cores are substantially faster than the Arm cores, but the Arm cores are substantially more plentiful at the same price point as the Intel cores, you can expect to see each perform different at different numbers of parallel requests. This is indeed what the results show, though we were surprised at how quickly the ARM cores overtook the Intel ones. At 30 parallel request the Intel outperformed the ARM but already at 75, ARM hit a more than 15% performance advantage and at 100 simultaneous requests and more, it delivered a roughly 40% performance uplift.

At 300, performance went down a little as the ARM server had some trouble retaining I/O performance – at this point, the database server was likely to be slowing it down, something we wouldn’t expect to happen in a real scenario with a separate database server. The new ThunderX2, meanwhile, has also addressed this issue besides offering an average of 3.7x the performance of the ThunderX in Anandtech benchmarking, making it an even more compelling solution.

Outlook

The performance of the ARM server in our workload was impressive. Considering the price point and the nature of a first-generation product for an entirely new market, an advantage of up to 40% is substantial. Together with ARM we are looking at the latest generation of the Cadvium systems, which promises to provide better scalability and performance per dollar, and pit it against the latest and greatest from Intel.

For our customers, these results offer an interesting insight in what hardware is fitting to their Nextcloud servers. While databases might benefit from fewer, stronger cores, a fleet of small cores can deliver impressive results as Nextcloud application server.

Read more https://nextcloud.com/blog/running-nextcloud-arm-server-can-provide-40-performance-per-dollar-uplift/

Partagez votre amour
Laurent LINTY
Laurent LINTY
Articles: 1477

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *