Skip to content
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

run server with dpdk failed #4

Open
xiaqunfeng opened this issue Jul 2, 2019 · 3 comments
Open

run server with dpdk failed #4

xiaqunfeng opened this issue Jul 2, 2019 · 3 comments

Comments

@xiaqunfeng
Copy link

I successfully built server and client.
When I run server with posix satck, it running successful:

# ./server --port=13001 --smp=1 --cpuset=5
WARN  2019-07-01 20:48:02,704 [shard 0] seastar - Unable to set SCHED_FIFO scheduling policy for timer thread; latency impact possible. Try adding CAP_SYS_NICE
TCP Echo-Server listen on: 13001
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
...
... // waiting for worker
...
current 1 total 1 qps 65054
current 1 total 1 qps 130049
current 1 total 1 qps 135699
current 1 total 1 qps 126766
current 1 total 1 qps 132650
current 1 total 1 qps 127944
current 1 total 1 qps 135250

When I run server with dpdk, it show me the error :

# ./server --port=13001 --smp=1 --cpuset=5 --dpdk-pmd --network-stack=native
EAL: Detected 56 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: No available hugepages reported in hugepages-2048kB
EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1
  Cause: Cannot init EAL

Could you give us any help?

@shanshanpt
Copy link
Owner

I successfully built server and client.
When I run server with posix satck, it running successful:

# ./server --port=13001 --smp=1 --cpuset=5
WARN  2019-07-01 20:48:02,704 [shard 0] seastar - Unable to set SCHED_FIFO scheduling policy for timer thread; latency impact possible. Try adding CAP_SYS_NICE
TCP Echo-Server listen on: 13001
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
current 0 total 0 qps 0
...
... // waiting for worker
...
current 1 total 1 qps 65054
current 1 total 1 qps 130049
current 1 total 1 qps 135699
current 1 total 1 qps 126766
current 1 total 1 qps 132650
current 1 total 1 qps 127944
current 1 total 1 qps 135250

When I run server with dpdk, it show me the error :

# ./server --port=13001 --smp=1 --cpuset=5 --dpdk-pmd --network-stack=native
EAL: Detected 56 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: No available hugepages reported in hugepages-2048kB
EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1
  Cause: Cannot init EAL

Could you give us any help?

You should configure the hugepage firstly. The steps like, as follows

sudo sh ./dpdk-setup.sh
Find "Setup hugepage mappings for NUMA systems"
sudo mkdir /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
...

@xiaqunfeng
Copy link
Author

Thank you for your reply.
When I choose "Setup hugepage mappings for NUMA systems", it always tells me permission denied.
The output as follows:

# sudo bash ./dpdk/usertools/dpdk-setup.sh
...
[45] Setup hugepage mappings for NUMA systems
...
Option: 45

Removing currently reserved hugepages
.echo_tmp: 2: .echo_tmp: cannot create /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
.echo_tmp: 3: .echo_tmp: cannot create /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
Unmounting /mnt/huge and removing directory

  Input the number of 2048kB hugepages for each node
  Example: to have 128MB of hugepages available per node in a 2MB huge page system,
  enter '64' to reserve 64 * 2MB pages on each node
Number of pages for node0: 64
Number of pages for node1: 64
Reserving hugepages
.echo_tmp: 2: .echo_tmp: cannot create /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
.echo_tmp: 3: .echo_tmp: cannot create /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
Creating /mnt/huge and mounting as hugetlbfs
mount: permission denied

Press enter to continue ...

@shanshanpt
Copy link
Owner

Thank you for your reply.
When I choose "Setup hugepage mappings for NUMA systems", it always tells me permission denied.
The output as follows:

# sudo bash ./dpdk/usertools/dpdk-setup.sh
...
[45] Setup hugepage mappings for NUMA systems
...
Option: 45

Removing currently reserved hugepages
.echo_tmp: 2: .echo_tmp: cannot create /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
.echo_tmp: 3: .echo_tmp: cannot create /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
Unmounting /mnt/huge and removing directory

  Input the number of 2048kB hugepages for each node
  Example: to have 128MB of hugepages available per node in a 2MB huge page system,
  enter '64' to reserve 64 * 2MB pages on each node
Number of pages for node0: 64
Number of pages for node1: 64
Reserving hugepages
.echo_tmp: 2: .echo_tmp: cannot create /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
.echo_tmp: 3: .echo_tmp: cannot create /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages: Read-only file system
Creating /mnt/huge and mounting as hugetlbfs
mount: permission denied

Press enter to continue ...

emmm... If you are in docker environment, use --privileged. In host environment, use sudo ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants