- Linux* Developer Center
- 🐧 Как заставить Linux работать быстрее на процессорах Intel
- Обратите внимание
- Как заставить Linux работать быстрее на процессорах Intel
- 3 thoughts on “ 🐧 Как заставить Linux работать быстрее на процессорах Intel ”
- Linux Find Out If CPU Support Intel VT/AMD-V Virtualization For KVM
- Say hello to /proc/cpuinfo file
- Am I using 64 bit CPU/system [x86_64/AMD64/Intel64]?
- Do I have hardware virtualization support?
- Do I have hardware AES/AES-NI advanced encryption support?
- Commands to check if your hardware supports virtualization
- Verify Intel VT CPU virtualization extensions on a Linux
- Verify AMD V CPU virtualization extensions on a Linux
- Verify Intel or AMD 64 bit CPU
- lscpu command
- Putting it all together
- Additional Intel x86 CPU specific virtualization flags
- Additional AMD x86 CPU specific virtualization flags
- Tip #1: See Linux kernel messages
- Tip # 2: Check your BIOS settings
- Tip # 3: XEN Kernel
Linux* Developer Center
SoC FPGA and NiosВ® II Processor
Linux is the most commonly used open-source operating system (OS). Linux is modeled after Unix and provides built-in drivers that support a vast array of devices, including devices found on IntelВ® SoC FPGA boards.
Intel provides an SoCВ FPGAВ Linux* kernel that is based on the Linux kernel from kernel.org together with other additions, such as board support packages and drivers. В
Intel is a core member of the Linux Foundation and contributes to many Linux open-source projects. Intel is a strong Linux community participant and supporter. The Intel Linux development website, RocketBoards.org, provides getting started help, design examples, documentation, and community forums to share ideas and collaborate.
Use the followingВ links to learn how to use Linux on Intel SoC FPGAs. For first time users, it is recommended to follow the resources linearly.
Visit RocketBoards.orgВ and click on the RegisterВ button. RocketBoards.org provides access to:
- Comprehensive SoC FPGA Linux* information:
- Updates on the latest Linux releases
- Step-by-step getting-started guides
- IntelВ® SoC FPGA Golden System Reference Designs (GSRD)
- Example projects, applications, and designs from Intel and the SoC community
- Community support
- Access to forum discussions and collaborations from Intel and the SoC community
- Active member participation in answering SoC FPGA and Linux questions
Why use Embedded Linux?
For embedded systems such as smartphones, tablets, PDAs, set-top boxes, and personal media players, an embedded Linux* OS is a natural choice because it addresses many of the features designers look for in an OS.
- This community-supported open-source software is free. You have the option of building your own Linux system by starting with a license-free Linux OS kernel. Available frameworks and applications are offered within the embedded Linux community to create the complete system solution.
- Embedded Linux offers better real-time performance over standard Linux because it is customized to work on an embedded platform and is optimized for power.
- The embedded Linux kernel is simpler and smaller than that of the standard Linux OS.
- Numerous companies contribute to the open-source embedded Linux with continuous kernel compatibility updates and advanced tools.
- Embedded Linux support sites, such as RocketBoards.org, provide new and advanced users with getting-started guides, design examples, and community forums.
- Developers that need a commercial embedded Linux solution can use available Linux distributions from WindRiver, MonteVista, and Timesys.
- Developers can find numerous device-specific drivers, such as USB and Ethernet.
- Developers can customize the Angstrom Distribution to their specific application. The latest Linux kernels are always available for download at kernel.org.
- Linux OS drivers offer a high-level device abstraction with minimal effort. You can build Linux drivers to provide user space access into custom user peripherals in the FPGA fabric.
- Embedded Linux offers a highly stable and tested kernel to use with safety-critical applications.
- Open-source safety groups provide presentations, literature, and safety certification for embedded Linux applications.
- Many custom-purpose microprocessors have embedded Linux kernel support.
- Collaborative development supports rapid Linux evolution.
- Linux communities provide a faster medium for incubation and the testing of new capabilities.
- Absence of contractual constraints allows developers to create new uses, markets, and platforms for the Linux OS.
Embedded Linux works especially well with IntelВ® SoC FPGAs because:
- Linux offers features that take full advantage of the Intel SoC hard processor system Symmetric Multiprocessor Hardware configuration
- Development vendors such as WindRiver, MontaVista, and Timesys offer Intel embedded Linux solutions for quick time to market
- The Linux kernel for Intel SoC FPGAs follows normal ARM* Linux processes for building and running.
After you decide to use a Linux system, there are certain aspects of your design that you need to consider:
- Decide if you want to build your own Linux system or use a commercial offering
- If you decide you do not want to build your own LinuxВ distribution you may use a commercial offering from WindRiver, Monta Vista, and Timesys or some other Linux application provider.
- If you decide to customize your design, you must determine which Linux kernel version to download from kernel.org.В A custom design requires more software development but offers a lower cost solution.
- Determine which kernel to use. This decision should be based on your application needs. The two versions are categorized as «stable» and «development». Visit kernel.org to see various available kernel options.
- Establish your build strategy.В The current supported build strategies are:
- Angstrom Distribution
- Yocto Project
- Determine if you want to use existing device drivers or create your own. You can find a list of available Intel SoC FPGA device drivers on RocketBoards.org.В
- Choose how to implement multiprocessing. The Intel SoC hard processor system is a classic symmetric multiprocessing (SMP) hardware configuration.В You can implement asymmetric multiprocessing (AMP) by using methods such as SMP with core affinity or core reservation. Please refer toВ the Technical Reference Manual (TRM) for more details.
- Determine if you require customization of some components of the Linux build process. If so, you must be familiar with the following:
- Linux boot process
- Tools used in the board bring-up process
- U-Boot customization
- Linux root file system and ways to customize it
NiosВ® II Processor on Linux System
Please visit theВ NiosВ® II Linux User Manual web page for Linux kernelВ build and boot instructions.
Источник
🐧 Как заставить Linux работать быстрее на процессорах Intel
Обратите внимание
Прежде чем приступить к реализации следующего решения, я должен предупредить вас – ЭТО ОЧЕНЬ НЕСЕКЬЮРНО и НЕ РЕКОМЕНДУЕТСЯ.
Это отключит все меры по смягчению последствий для Spectre и Meltdown на процессорах Intel и сделает ваши системы Linux широко открытыми для всех угроз безопасности.
Если вы четко не знаете, что делаете, не делайте этого.
Вы были предупреждены!
Если вы просто не заботитесь о безопасности, отключите средства защиты, как описано ниже.
Как заставить Linux работать быстрее на процессорах Intel
Отредактируйте файл GRUB, используя предпочитаемый текстовый редактор.
На Debian, Ubuntu:
Это повышает производительность системы, но может также подвергать пользователей нескольким уязвимостям ЦП.
Если вы используете версии ядра старше 5.1.13, добавьте / отредактируйте следующее:
Это параметры ядра, которые вы можете использовать для отключения всех мер по смягчению Spectre/Meltdown , которые замедляют работу вашей системы Linux.
После добавления параметров ядра обновите конфигурацию GRUB с помощью команды:
Наконец, перезагрузите систему:
В системах на основе RPM, таких как CentOS и RHEL, отредактируйте файл /etc/sysconfig/grub:
и сделайте ребут:
Теперь мы отключили все меры по смягчению Spectre и Meltdown.
3 thoughts on “ 🐧 Как заставить Linux работать быстрее на процессорах Intel ”
При создании виртуальной машины, вы можете создать два различных типа виртуальных дисков. По умолчанию программа обычно предлагает использовать динамически выделяемые диски, которые растут, вместе с занимаемым местом гостевой ОС. Например, если вы создаете новую виртуальную машину с динамически выделяемым диском с максимальным размером 30 Гб, это не займет до 30 Гб места на жестком диске сразу.После установки операционной системы и программ, диск может только занять до 10 Гб. По мере добавления файлов на виртуальном диске, он будет расширяться до максимального размера в 30 Гб. Это может быть удобно — каждая виртуальная машина не будет занимать неоправданно много места на вашем жестком диске. Тем не менее, это медленнее, чем создание фиксированного размера диска (диск с заранее выделенным местом). При создании фиксированного размера диска, все 30 Гб, будет занято немедленно на вашем компьютере. Здесь есть компромисс — фиксированный размер диска занимает больше места на жестком диске, но работает с виртуальным жестким диском быстрее. Вы также избавитесь от фрагментации файла — место будет занято большим блоком вместо того, чтобы добавлять по всему диску более мелкие куски. Ваш антивирус может сканировать файлы виртуальной машины, когда к ним происходит обращение, снижая производительность. Антивирус не сможет определить вирус внутри виртуальной машины, работающий на вашей гостевой операционной системе, так что эта проверка только вредит. Чтобы ускорить процесс, вы можете добавить свой виртуальный каталог машины в список исключений антивирусного автора. Как только он находится в списке, ваш антивирус будет игнорировать все файлы в этом каталоге.
Источник
Linux Find Out If CPU Support Intel VT/AMD-V Virtualization For KVM
H ow do I find out if my system support Intel – VT / AMD -V hardware virtualization extensions for host CPU using the command line options? How do I check if my Linux hardware from HP/IBM/Dell supports virtualization?
Both Intel and AMD CPU support virtualization technology which allows multiple operating systems to run simultaneously on an x86 server or computer in a safe and efficient manner using hardware virtualization. XEN, KVM, Vmware and other virtualization software can use Intel and AMD hardware virtualization for full virtualization. In other words with Intel VT, or AMD-V you can run an unmodified guest OS, like MS-Windows without any problems. To run KVM, you need a CPU that supports hardware virtualization.[donotprint]
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | Intel/AMD x86 server |
Est. reading time | 2m |
[/donotprint]
Say hello to /proc/cpuinfo file
The /proc/cpuinfo file has information about your CPU. The information includes, the number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also formation about the CPU caches and cache sharing, family, model, bogoMIPS, byte order, and stepping. You need to note down the following vendor specific cpu flags:
Am I using 64 bit CPU/system [x86_64/AMD64/Intel64]?
- lm – If you see lm flag means you’ve 64 bit Intel or AMD cpu.
Do I have hardware virtualization support?
- vmx – Intel VT-x, virtualization support enabled in BIOS.
- svm – AMD SVM,virtualization enabled in BIOS.
Do I have hardware AES/AES-NI advanced encryption support?
- aes – Applications performing encryption and decryption using the Advanced Encryption Standard on Intel and AMD cpus.
Commands to check if your hardware supports virtualization
Use the following commands to verify if hardware virtualization extensions is enabled or not in your BIOS.
Verify Intel VT CPU virtualization extensions on a Linux
Type the following command as root to verify that host cpu has support for Intel VT technology, enter:
# grep —color vmx /proc/cpuinfo
Sample outputs:
Fig.01: Linux check Intel VT — if my server can run full virtualization or not
Verify AMD V CPU virtualization extensions on a Linux
Type the following command as root to verify that host cpu has support for AMD – V technology:
# grep —color svm /proc/cpuinfo
Linux lscpu command to find Virtualization AMD-V support
Verify Intel or AMD 64 bit CPU
Type the following grep command:
grep -w -o lm /proc/cpuinfo | uniq
See our tutorial “Find If Processor (CPU) is 64 bit / 32 bit on a Linux” for more info.
lscpu command
The lscpu command shows CPU architecture information on a Linux server:
lscpu
Sample outputs from Intel server:
Fig.02: lscpu command on a Linux server to find out Virtualization support
Putting it all together
Type the following egrep command:
Fig.03: Finding Intel virtualization, encryption and 64 bit cpu in a single command
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Additional Intel x86 CPU specific virtualization flags
- ept – Intel extended page table support enabled to make emulation of guest page tables faster.
- vpid – Intel virtual processor ID. Make expensive TLB flushes unnecessary when context switching between guests.
- tpr_shadow and flexpriority – Intel feature that reduces calls into the hypervisor when accessing the Task Priority Register, which helps when running certain types of SMP guests.
- vnmi – Intel Virtual NMI helps with selected interrupt events in guests.
Additional AMD x86 CPU specific virtualization flags
- npt – AMD Nested Page Tables, similar to Intel EPT.
- lbrv – AMD LBR Virtualization support.
- svm_lock – AMD SVM locking MSR.
- nrip_save – AMD SVM next_rip save.
- tsc_scale – AMD TSC scaling support.
- vmcb_clean – AMD VMCB clean bits support.
- flushbyasid – AMD flush-by-ASID support.
- decodeassists – AMD Decode Assists support.
- pausefilter – AMD filtered pause intercept.
- pfthreshold – AMD pause filter threshold.
Some tips to solve your problems.
Tip #1: See Linux kernel messages
Type the following command to see kvm support enabled or not in BIOS:
# dmesg | less
# dmesg | grep -i kvm
Tip # 2: Check your BIOS settings
By default, many system manufacturers disables an AMD or Intel hardware CPU virtualization technology in the BIOS. You need to reboot the system and turn it in the BIOS. Once turned on, run lscpu or grep command as discussed earlier to see if your virtualization support enabled:
$ lscpu
$ egrep -wo ‘vmx|ept|vpid|npt|tpr_shadow|flexpriority|vnmi|lm|aes’ /proc/cpuinfo | sort | uniq
$ egrep -o ‘(vmx|svm)’ /proc/cpuinfo | sort | uniq
Sampple outputs:
Tip # 3: XEN Kernel
By default, if you booted into XEN kernel it will not display svm or vmx flag using the grep command. To see if it is enabled or not from xen, enter:
cat /sys/hypervisor/properties/capabilities
You must see hvm flags in the output. If not reboot the box and set Virtualization in the BIOS.
References
- The Linux kernel source/header file located at /usr/src/kernels/$(uname -r)/arch/x86/include/asm/cpufeature.h (or click here to see cpufeature.h online)
- Man pages – proc(5)
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник