-
Notifications
You must be signed in to change notification settings - Fork 182
Avx2 deprecation pt2 #3800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/7.6
Are you sure you want to change the base?
Avx2 deprecation pt2 #3800
Changes from all commits
05c8a98
2e3c637
88fc05d
083001d
bf3fa2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,49 @@ | |
[abstract] | ||
{description} | ||
|
||
[tabs] | ||
## CPU Requirements | ||
|
||
Couchbase Server can run on x86 and ARM processors (including Apple Silicon processors). | ||
This section explains the minimum requirements for of these platforms. | ||
|
||
### x86 Processors | ||
|
||
|
||
[#avx2-requirements] | ||
.deprecation notice | ||
[IMPORTANT] | ||
==== | ||
x86 Processors:: | ||
+ | ||
-- | ||
The use of older x86 processors that do not implement the https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#AVX2[Advanced Vector Extensions 2 (AVX2)] instruction set are deprecated in Couchbase Server 7.6.x. | ||
Future versions will require processors that have AVX2 support. | ||
This requirements is only for x86 processors--ARM processors have a separate set of vector instructions. | ||
|
||
The earliest processors that support AVX2 instructions include: | ||
|
||
* Intel 4th generation (Haswell) Core processors released in 2013. | ||
* Intel 11th generation (Tiger Lake) Celeron and Pentium processors released in 2020. | ||
* AMD Excavator processors released in 2015. | ||
|
||
Processors from these or later generations will be required to run Couchbase Server in the future. | ||
|
||
On Linux, you can tell if your processor has the AVX2 instructions by executing the following command: | ||
|
||
[source,bash] | ||
---- | ||
grep -q -i 'avx2' /proc/cpuinfo && \ | ||
echo "Processor has AVX2" || echo "AVX2 not found" | ||
---- | ||
|
||
If the command returns the text `Processor has AVX2`, your processor is supported in future Couchbase Server releases. | ||
If the command returns `AVX2 not found`, your processor does not have AVX2 instructions and will not be supported in future Couchbase Server versions. | ||
==== | ||
|
||
|
||
Couchbase Server has the following requirements when running on x86 processors. | ||
|
||
|
||
[cols="80,180,180"] | ||
|=== | ||
| | Minimum Specifications* | Recommended Specifications** | ||
| | Minimum Specifications<<#note1,*>> | Recommended Specifications<<#note2,**>> | ||
|
||
| *CPU* | ||
| 2 GHz dual core x86_64 CPU supporting SSE4.2 | ||
|
@@ -33,14 +68,15 @@ a| | |
|
||
Network file systems such as CIFS and NFS are not supported. | ||
|=== | ||
-- | ||
|
||
ARM Processors:: | ||
+ | ||
-- | ||
### ARM Processors | ||
|
||
Couchbase Server has the following requirements when running on ARM-based platforms. | ||
|
||
|
||
[cols="80,180,180"] | ||
|=== | ||
| | Minimum Specifications* | Recommended Specifications** | ||
| | Minimum Specifications<<#note1,*>> | Recommended Specifications<<#note2,**>> | ||
|
||
| *CPU* | ||
| 2 Ghz dual core 64bit ARM v8 CPU | ||
|
@@ -60,39 +96,52 @@ a| | |
|
||
Network file systems such as CIFS and NFS are not supported. | ||
|=== | ||
-- | ||
==== | ||
|
||
|
||
|
||
*_You can reduce the CPU and RAM resources below the Minimum Specifications for development and testing purposes. | ||
[#note1] | ||
^*^You can reduce the CPU and RAM resources below the Minimum Specifications for development and testing purposes. | ||
Resources can be as low as 1 GB of free RAM beyond operating system requirements, and a single CPU core. | ||
However, you must adhere to the Minimum Specifications for production._ | ||
|
||
**_The Recommended Specifications don't take into account your intended workload. | ||
You should follow the xref:sizing-general.adoc[sizing guidelines] when determining system specifications for your Couchbase Server deployment._ | ||
[#note2] | ||
^**^The Recommended Specifications do not take into account your intended workload. | ||
You should follow the xref:sizing-general.adoc[sizing guidelines] when determining system specifications for your Couchbase Server deployment. | ||
|
||
[#clock-source-linux] | ||
Clock Source on Linux:: The Query service uses the OS monotonic clock for profiling and network timeout purposes. | ||
+ | ||
The Linux kernel uses the _Clock Source_ to obtain the current clock value and this information is stored in `/sys/devices/system/clocksource/clocksource0/current_clocksource`. There are several clock sources (TSC, XEN, and others), which are used depending on the hardware clock capabilities, and the OS installation. The XEN source, which is seen to be the default on AWS setups, can use up to 25% of all available CPU time to obtain the current timestamp. The TSC clock source, on the other hand, incurs very little CPU cost. We recommend changing the clock source to TSC if it is set to anything else. | ||
+ | ||
Check the clock source on your Linux OS using the following command: | ||
## Clock Source on Linux | ||
|
||
The Query Service relies on the Linux operating system's monotonic clock when profiling and managing network timeouts. | ||
|
||
The Linux kernel uses a clock source to track elapsed time, handle scheduling and timers, and to get the current time. | ||
It can use one of several possible sources, such as Time Stamp Counter (TSC), the XEN build into the Xen virtualization framework, and others. | ||
See https://docs.kernel.org/timers/timekeeping.html[Clock sources, Clock events, sched_clock() and delay timers^] for more information about clock sources. | ||
Which source the kernel uses depends on the hardware clock capabilities and Linux configuration settings. | ||
|
||
Some virtualization environments, such as older AWS EC2 clusters, use the XEN clock source. | ||
This source can cause performance issues because reading it requires an expensive system call to the hypervisor. | ||
In some cases, a XEN clock source has used up to 25% of CPU time when timers are in heavy use. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blimey! As much as that?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's from the original docs... I don't have any contradictory numbers, so I'll just keep it. For what it's worth, ChatGPT also seemed a bit surprised. |
||
|
||
The TSC clock source incurs little CPU cost because it's a CPU instruction instead of a kernel or hypervisor call. | ||
If your platform has a reliable and invariant implementation of TSC, use it as the clock source. | ||
Consult the documentation for your platform for more information about its TSC implementation. | ||
|
||
Use the following command to see which clock source Linux is using: | ||
|
||
[source, bash] | ||
---- | ||
cat /sys/devices/system/clocksource/clocksource0/current_clocksource | ||
---- | ||
+ | ||
Change the clock source using the following commands: | ||
|
||
You can change the clock source to TSC by running the following command as root: | ||
|
||
[source,bash] | ||
---- | ||
echo tsc > /sys/devices/system/clocksource/clocksource0/current_clocksource | ||
---- | ||
+ | ||
To verify the current setting of the clock source, use: | ||
|
||
Verify the current setting of the clock source, read the `current_clocksource` again: | ||
[source,bash] | ||
---- | ||
cat /sys/devices/system/clocksource/clocksource0/current_clocksource | ||
---- | ||
+ | ||
The output should read `tsc`. | ||
The output should read `tsc`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but where is the opening
_
for this footnote?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original actually just rendered the entire footnote as italic, which is against our style guides. In my opinion, it also makes it hard to read. I had thought about just replacing the footnotes by moving the text someplace else, like a new subheading, or maybe pushing it up before the tables.