You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can continue learning about porting other cloud applications to the Arm architecture for increased performance and cost savings.
7
+
You can continue learning about Large System Extensions and how to use them in your applications.
8
8
# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/glibc-with-lse/build_glibc_with_lse.md
+26-38Lines changed: 26 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,26 @@ layout: "learningpathall"
9
9
---
10
10
11
11
12
-
## Before you begin
12
+
## Overview
13
13
"Glibc with LSE" refers to the version of [the GNU C Library (glibc)](https://www.gnu.org/software/libc/) that includes support for [LSE (Large Systems Extensions)](https://learn.arm.com/learning-paths/servers-and-cloud-computing/lse/). LSE is an extension to the ARMv8-A architecture that provides enhanced atomic operations and memory model features.
14
14
15
15
LSE introduces additional atomic instructions and operations, such as Load-Acquire, Store-Release, and Atomic Compare-and-Swap (CAS). These operations allow for more efficient synchronization and concurrent access to shared memory in multi-threaded applications running on ARMv8-A processors.
16
16
17
17
When glibc is compiled with LSE support, it can take advantage of these enhanced atomic operations provided by the LSE extension. This can potentially improve the performance of multi-threaded applications that heavily rely on atomic operations and synchronization primitives.
18
18
19
+
## Before you begin
20
+
21
+
Launch an [Arm based instance](/learning-paths/servers-and-cloud-computing/csp/) running Ubuntu version 20.04.
22
+
23
+
On your machine, install the dependencies required to build glibc:
24
+
25
+
```bash
26
+
sudo apt update
27
+
sudo apt install -y gcc-10 g++-10 gawk bison make
28
+
```
19
29
20
30
## Build and Install Glibc
21
-
You can build glibc without installing, or with installing to a specific directory.
31
+
You can now checkout the glibc source package and create a build directory:
You have now successfully built glibc from source without LSE.
47
50
48
-
- __With installing to a specific directory__
49
-
```bash
50
-
install=~/glibc-2.32_build_install/install
51
-
mkdir -p ${install}
52
-
sudo make -C $build -j$(expr $(nproc) - 1) install DESTDIR=${install}
53
-
sudo make -C $build -j$(expr $(nproc) - 1) localedata/install-locales DESTDIR=${install}
54
-
sudo make -C $build -j$(expr $(nproc) - 1) localedata/install-locale-files DESTDIR=${install}
55
-
```
51
+
Now lets look at how you can build it with LSE support.
56
52
53
+
## Build glibc With LSE
54
+
To build glibc with LSE, you should add `CFLAGS` and `CXXFLAGS` to the configure command.
57
55
58
-
## With LSE
59
-
If you want to build glibc with LSE, you should add `CFLAGS` and `CXXFLAGS` to configure implicitly or explicitly.
56
+
You can do this one of two ways. One way is to use "-mcpu=native" which tells the compiler to detect the architecture/micro-architecture of your machine. The other way is to pass the exact architecture option of your machine to the compiler using "-mcpu=neoverse-n2+lse"
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/glibc-with-lse/compare_result.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,13 @@ weight: 6 # 1 is first, 2 is second, etc.
7
7
layout: "learningpathall"
8
8
---
9
9
10
-
Now you can run the mongodb benchmark using Glibc with LSE and NoLSE and compare the results.
10
+
You can run the mongodb benchmark using Glibc with LSE and NoLSE and compare the results. This will give you an idea of the performance gained by using Glibc with LSE.
11
11
12
12
## Result with No-LSE
13
13
Launch MongoDB with Glibc without LSE and obtain benchmark result.
14
-
The overall TPS is __6662.1275371047195__ with No-LSE Glibc.
0 commit comments