Project

General

Profile

Bug #7234

ntpd overload during IPsec session without HW acceleration

Added by Constantine Kormashev almost 3 years ago.

Status:
New
Priority:
Low
Assignee:
Category:
NTPD
Target version:
-
Start date:
02/08/2017
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.3.x
Affected Architecture:

Description

During performance test 2440 I noticed quite strange behavior of ntpd. One overloads CPU core during IPsec session if HW acceleration is disabled:

kldstat
Id Refs Address            Size     Name
 1    1 0xffffffff80200000 225ede0  kernel

last pid: 42143;  load averages:  3.41,  2.35,  1.15    up 0+00:07:28  09:19:23
54 processes:  2 running, 51 sleeping, 1 waiting
CPU 0:  9.4% user,  0.0% nice, 20.4% system, 65.9% interrupt,  4.3% idle
CPU 1: 18.4% user,  0.0% nice, 53.7% system,  0.0% interrupt, 27.8% idle
Mem: 45M Active, 39M Inact, 140M Wired, 21M Buf, 3676M Free
Swap: 3647M Total, 3647M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE   C   TIME     CPU COMMAND
16307 root        2  20    0 30144K 17988K usem    1   1:28 *100.00% ntpd*
23986 root       17  21    0   217M 13796K uwait   0   3:15  80.66% charon
   11 root        2 155 ki31     0K    32K RUN     1   6:20  12.16% idle
   12 root       27 -72    -     0K   432K WAIT    1   2:56   2.49% intr
    0 root       20  -8    -     0K   320K -       0   0:22   0.00% kernel

If HW acceleration is enabled there is not issues with ntpd, one sometimes can load CPU about 3-5% for several seconds:

kldstat 
Id Refs Address            Size     Name
 1    4 0xffffffff80200000 225ede0  kernel
 2    1 0xffffffff82611000 7577     aesni.ko

last pid: 99164;  load averages:  5.32,  2.80,  1.22    up 3+14:47:13  09:04:56
54 processes:  3 running, 50 sleeping, 1 waiting
CPU 0:  4.3% user,  0.0% nice, 15.7% system, 80.0% interrupt,  0.0% idle
CPU 1:  8.2% user,  0.0% nice, 21.6% system, 70.2% interrupt,  0.0% idle
Mem: 11M Active, 75M Inact, 153M Wired, 382M Buf, 3661M Free
Swap: 3647M Total, 3647M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE   C   TIME     CPU COMMAND
   12 root       27 -72    -     0K   432K WAIT    1  51:30 200.00% intr
   11 root        2 155 ki31     0K    32K RUN     1 171.4H   2.83% idle
15438 root        2  20    0 30144K 17988K usem    0   7:20   *0.49% ntpd*
53451 root       17  72    0   217M 14684K RUN     0   0:50   0.20% charon
    0 root       20  -8    -     0K   320K -       0   8:28   0.00% kernel

Checked on 2440

uname -a
FreeBSD pfSense.localdomain 10.3-RELEASE-p5 FreeBSD 10.3-RELEASE-p5 #0 7307492(RELENG_2_3_2): Tue Jul 19 13:29:35 CDT 2016     root@ce23-amd64-builder:/builder/pfsense-232/tmp/obj/builder/pfsense-232/tmp/FreeBSD-src/sys/pfSense  amd64

Checked on 4860. For this device it does not matter is HW acceleration enabled or disabled, picture is same. (I have got strong suspicion there is an issue with HW acceleration on 4860)

uname -a
FreeBSD pfSense.localdomain 10.3-RELEASE-p9 FreeBSD 10.3-RELEASE-p9 #1 5fc1b19(RELENG_2_3_2): Tue Sep 27 12:25:49 CDT 2016     root@factory23-amd64-builder:/builder/factory-232/tmp/obj/builder/factory-232/tmp/FreeBSD-src/sys/pfSense  amd64

Also available in: Atom PDF