Ubuntu Server Guide Changes, errors and bugs
DPDK HugePage configuration
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Compile DPDK Applications
DPDK HugePage configuration
DPDK makes heavy use of huge pages to eliminate pressure on the TLB. Therefore hugepages have to be configured in your system. The dpdk package has a config file and scripts that try to ease hugepage configuration for DPDK in the form of /etc/dpdk/dpdk.conf. If you have more consumers of hugepages than just DPDK in your system or very special requirements how your hugepages are going to be set up you likely want to allocate/control them by yourself. If not this can be a great simplification to get DPDK configured for your needs. Here an example configuring 1024 Hugepages of 2M each and 4 1G pages. NR_2M_PAGES=1024 NR_1G_PAGES=4 As shown this supports configuring 2M and the larger 1G hugepages (or a mix of both). It will make sure there are proper hugetlbfs mountpoints for DPDK to find both sizes no matter what your default huge page size is. The config file itself holds more details on certain corner cases and a few hints if you want to allocate hugepages manually via a kernel parameter. It depends on your needs which size you want - 1G pages are certainly more effective regarding TLB pressure. But there were reports of them fragmenting inside the DPDK memory allocations. Also it can be harder to grab enough free space to set up a certain amount of 1G pages later in the life-cycle of a system. 69 Compile DPDK Applications Currently there are not a lot consumers of the DPDK library that are stable and released. OpenVswitch- DPDK being an exception to that (see below) and more are appearing. But in general it might still happen that you might want to compile an app against the library. You will often find guides that tell you to fetch the DPDK sources, build them to your needs and eventually build your application based on DPDK by setting values RTE_* for the build system. Since Ubuntu provides an already compiled DPDK for you can can skip all that. DPDK provides a valid pkg-config file to simplify setting the proper variables and options. sudo apt−g e t i n s t a l l dpdk−dev libdpdk −dev g c c t e s t d p d k p r o g . c $ ( pkg−c o n f i g −− l i b s −−c f l a g s l i b d p d k ) −o t e s t d p d k p r o g An example of a complex (autoconfigure) user of pkg-config of DPDK including fallbacks to older non pkg-config style can be seen in the OpenVswitch build system. Depending on what you build it might be a good addition to install all of DPDK build dependencies before the make, which on Ubuntu can be done automatically with. sudo apt−g e t i n s t a l l b u i l d −dep dpdk Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling