Modify

Opened 2 years ago

Closed 2 years ago

#20657 closed defect (not_a_bug)

Writing to /dev/null results in 100% cpu usage

Reported by: makedir@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:

Description

Considering http://wiki.openwrt.org/doc/howto/bwmon doing a speedtest, I tried the method with wget:

wget --no-check-certificate https://testlink/testfile -O /dev/null

But this results in 100% CPU usage and the bandwidth is therefor capped, for me at 2,98MB/s. The device is a Netgear WNDR3800 running r47073. I dont think this is normal, or is it? The WAN line is capable doing about 5MB/s.

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by bittorf@…

this sounds like you are writing to disc/flash not to /dev/null
can you please double check that? e.g. ls -l /dev/null or
other things?

comment:2 Changed 2 years ago by makedir@…

root@wrtkue:~# ls -l /dev/null
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 /dev/null
root@wrtkue:~# wget --no-check-certificate https://m...:*password*@....de/s.../100mbtest.bin -O /dev/null
--2015-10-02 18:18:16--  https://m...:*password*@....de/s.../100mbtest.bin
Resolving m....de... 2a00...9::a8, 62...171
Connecting to ....de|2a0...9::a8|:443... failed: Permission denied.
Connecting to ....de|6...1|:443... connected.
WARNING: cannot verify ....de's certificate, issued by 'CN=...1':
  Self-signed certificate encountered.
    WARNING: certificate common name '...1' doesn't match requested host name 'm....de'.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="...m"
Reusing existing connection to m...de:443.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: '/dev/null'

/dev/null            13%[=>                    ]  13.55M  2.95MB/s   eta 30s   ^C
root@wrtkue:~# ls -l /dev/null
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 /dev/null
root@wrtkue:~#

Doing this results in 100% cpu usage of wget monitored via secon ssh htop/top. Tested on three different WNDR3800 routers. It always caps around ~2.9MB/s.

comment:3 Changed 2 years ago by makedir@…

root@wrtkue:~# wget -V
GNU Wget 1.16.3 built on linux-gnu.

+digest +https +ipv6 -iri +large-file -nls +ntlm +opie -psl +ssl/openssl

Wgetrc:
    /etc/wgetrc (system)
Compile:
    mips-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H
    -DSYSTEM_WGETRC="/etc/wgetrc" -DLOCALEDIR="/usr/share/locale" -I.
    -I../lib -I../lib
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include
    -I/home/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include
    -I/home/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
    -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc
    -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
    -msoft-float -mips16 -minterlink-mips16
Link:
    mips-openwrt-linux-uclibc-gcc
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
    -I/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include
    -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc
    -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
    -msoft-float -mips16 -minterlink-mips16
    -L/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib
    -L/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib
    -L/home/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib
    -L/home/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib
    -L/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib
    -lpcre
    /home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/libssl.so
    /home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/libcrypto.so
    -ldl
    -L/home/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib
    -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a

Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
root@wrtkue:~#

comment:4 Changed 2 years ago by nbd

  • Resolution set to not_a_bug
  • Status changed from new to closed

You're using https, so there's encryption involved. The CPU simply isn't powerful enough to handle that at wire speed.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.