• No results found

Code Density

In document SINGLE-BOARD COMPUTERS (Page 133-141)

As 1GB of RAM included on the Pi is constraining, you should have some idea of the penalty AArch64 imposes.

Below is a script that I’ve used to size all the ELF binaries in Raspbian Linux running on the original Raspberry Pi, storing this in the file a32.txt:

DEEP DIVE

for x in /bin/*

do [ -f "$x" ] &&

case "$(file "$x")" in

*ELF*) stat -c %n\ %s "$x";;

esac

done > a32.txt

Moving this file to Oracle Linux running on the Raspberry Pi Model 3 B+, I run the following to find the size differences:

while read p s do [ -f "$p" ] &&

case "$(file "$p")" in

*ELF*) echo $p $s $(stat -c %s "$p");;

esac

done < a32.txt | awk '

{a+=$2; b+=$3; print $1,$2,$3,$3/$2}

END {print a,b,b/a}' > a64.txt

For this small sample of 66 files, I found the results shown in Table 1.

Table 1. Results of Size Differences of 66 Files

Program Raspbian OL7.6 % increase

/bin/bash 912712 971728 1.06466

/bin/cat 30560 70408 2.30393

/bin/chgrp 51084 70944 1.38877

/bin/chmod 46956 70840 1.50865

/bin/chown 51092 71000 1.38965

/bin/cp 104592 204296 1.95327

/bin/cpio 118460 141752 1.19662

/bin/date 83868 70368 0.839033

135 | March 2019 | https://www.linuxjournal.com

DEEP DIVE

137 | March 2019 | https://www.linuxjournal.com

DEEP DIVE

These programs take nearly twice the space in Oracle Linux as they do in Raspbian.

This somewhat explains the CentOS decision to remain on AArch32 with smaller 32-bit binaries. Oracle’s pursuit of AArch64 is likely due to similar platforms that it supports or may support in the future.

Should Oracle elect to provide a Thumb2 development environment in the same way that it supports 32-bit x86, then Oracle could produce even smaller binaries than are found in Raspbian while still running a 64-bit kernel, at some cost to performance. This assumes that all target platforms support Thumb2; by all appearances, the Fujitsu A64FX does not.

It might be useful to examine commonly run server dæmons, system libraries and extract the text/data/bss segment sizes within all of these programs to see greater detail on the AArch64 penalty paid here. Those with large ARM deployments are encouraged to do so.

Conclusion

It’s refreshing to have a new Linux distribution where legacy support is slashed in a way that never would be tolerated within Intel/AMD64 environments. There is substantial complexity and inertia in the maintenance of the systems of

decades past.

Still, the relative silence in the documentation on questions of (the overlooked WiFi) hardware support and the legacy Thumb and AArch32 instruction sets is unsettling. Operating system vendors should be clear on what their products can and cannot do with the target hardware. While there are issues with Oracle AArch64 Linux where that clarity is lacking, it must be conceded that this is a pre-production release, and the desired clarity and supported server-grade AArch64 target platforms may not yet exist. To reiterate, one possible hardware target is the Fujitsu A64FX, which designers are asserting as the fastest processor in the world. Amazon also recently began running ARM workloads in its EC2 cloud with its Graviton processor, but Gravitons are not expected to outperform the Fujitsu A64FX, and the relationship between Amazon and Oracle

DEEP DIVE

is not warm. Oracle also may be developing its own AArch64 specifically tuned for Oracle’s database. Oracle previously has maintained SPARC in this capacity, and continues to dominate the TPC benchmark with it; the company also may decide to do this with its own ARM processor.

On the subject of the Oracle Database, the absence of any discussion or mention of it also is a cause for substantial concern on the longevity of the platform.

In any case, Oracle AArch64 Linux likely will be used by many pursuing low-power, large memory applications. The Raspberry Pi may be able to provide a development environment for those larger systems. It’s encouraging to see ARM move into the enterprise space, and the prospect of a legacy-free computing environment without all the problems (Meltdown), scandals (ME/PSP) and firmware concerns of Intel is quite refreshing. ◾

Charles Fisher has an electrical engineering degree from the University of Iowa and works as a systems and database administrator for a Fortune 500 mining and manufacturing corporation.

Resources

• Oracle Linux for ARM Downloads

• Raspberry Pi (Wikipedia)

• Btrfs—the Next Generation Filesystem for Linux

• CentOS and AArch64

• Oracle Linux for Sparc Downloads

• “Fujitsu’s A64FX ARM Chip Waves The HPC Banner High” by Timothy Prickett Morgan

139 | March 2019 | https://www.linuxjournal.com

DEEP DIVE

• R4000 Microprocessor from 1991 (Wikipedia)

• UltraSPARC Microprocessor from 1995 (Wikipedia)

• “ARM Creators Sophie Wilson and Steve Furber, Part Two:

the accidental chip” by Chris Bidmead, The Register

• Acorn Archimedes (Wikipedia)

• Apple Newton (Wikipedia)

• Thumb and Thumb-2 (Wikipedia)

• “RISC instruction sets I have known and disliked” by Jack Whitham

• Conditional Execution (Wikipedia)

• R15/PC register (Wikipedia)

• Types of Flash Memory (Wikipedia)

• “Making flash memory more reliable with 800°C heat pulses”

by Mark Tyson

• Installation of Raspberry Pi 3 Image—Release Notes for Oracle Linux 7 Update 6 (aarch64)

• Btrfs Gotchas

“ZFS for Linux” by Charles Fisher, LJ, March 2018

• BusyBox

“Infinite BusyBox with systemd” by Charles Fisher, LJ, March 2015

• BusyBox 1.28.1 Release

• What are the differences between ARMv7-A, ARMv7-R and ARMv7-M?

(arm Developer)

• GNU ARM Embedded Toolchain Downloads (arm Developer)

• armbian firmware

DEEP DIVE

Send comments or feedback

via https://www.linuxjournal.com/contact or email [email protected].

• SDIO cards (Wikipedia)

• CentOS on ARMv7hl boards

• The Raspberry Pi 3 B+ in Fedora (nullr0ute’s blog)

• Fujitsu A64FX Post-K Supercomputer: World’s Fastest ARM Processor (YouTube)

• “Amazon’s homegrown 2.3GHz 64-bit Graviton processor was very nearly an AMD Arm CPU” by Chris Williams, The Register

• SPARC SuperCluster with T3-4 Servers

141 | March 2019 | https://www.linuxjournal.com

DEEP DIVE

PiBox: an Embedded

In document SINGLE-BOARD COMPUTERS (Page 133-141)