AWS SDKを使用しているとslabが肥大化していく現象
NSS_SDB_USE_CACHE=yesが利用できるのが、nss3.16以上とあるが、
nss-softokn-3.14.3-12.el6 という情報もあるため、確認
https://bugzilla.redhat.com/show_bug.cgi?id=1044666
http://tama1029hq.hatenablog.com/entry/2016/12/12/105353
—
Amazon Linux
1 2 3 4 5 6 7 |
[root@freeserver ec2-user]# rpm -qa | grep nss-softokn nss-softokn-3.16.2.3-14.2.38.amzn1.x86_64 nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64 [root@freeserver ec2-user]# curl -V curl 7.47.1 (x86_64-redhat-linux-gnu) libcurl/7.47.1 NSS/3.21 Basic ECC zlib/1.2.8 libidn/1.18 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets PSL |
この場合、NSS/3.21
が有効なのだろうか。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@freeserver ec2-user]# strace -fc -e trace=access curl -s https://www.google.co.jp/ > /dev/null Process 29754 attached % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000008 0 5383 5378 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000008 5383 5378 total [root@freeserver ec2-user]# NSS_SDB_USE_CACHE=yes strace -fc -e trace=access curl -s https://www.google.co.jp/ > /dev/null Process 29780 attached % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 17 14 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 17 14 total [root@freeserver ec2-user]# yum list nss-softokn |
→効いている。
—
さくら(CentOS release 6.6 (Final))
1 2 3 4 5 6 7 8 9 |
[nilesflow@dev ~]$ cat /etc/redhat-release CentOS release 6.6 (Final) [nilesflow@dev ~]$ rpm -qa | grep nss-softokn nss-softokn-3.14.3-18.el6_6.x86_64 nss-softokn-freebl-3.14.3-18.el6_6.x86_64 [nilesflow@dev ~]$ curl -V curl 7.46.0 (x86_64-pc-linux-gnu) libcurl/7.46.0 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets |
1 2 3 4 5 6 7 8 9 10 11 |
[nilesflow@dev ~]$ strace -fc -e trace=access curl 'https://www.google.com' > /dev/null Process 3673 attached Process 3673 detached % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12028 0 12028 0 0 84852 0 --:--:-- --:--:-- --:--:-- 87795 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- -nan 0.000000 0 3 2 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 3 2 total |
→再現しない
—
CentOS6.9(Amazonマーケットプレイス)
1 2 3 4 5 6 7 8 9 |
[centos@ip-172-31-16-82 ~]$ cat /etc/redhat-release CentOS release 6.9 (Final) [centos@ip-172-31-16-82 ~]$ rpm -qa | grep nss-softokn nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 nss-softokn-3.14.3-23.3.el6_8.x86_64 [centos@ip-172-31-16-82 ~]$ curl -V curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz |
1 2 3 4 5 6 7 8 9 10 11 12 |
[centos@ip-172-31-16-82 ~]$ strace -fc -e trace=access curl -s https://www.google.co.jp/ > /dev/null % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000072 0 1811 1808 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000072 1811 1808 total [centos@ip-172-31-16-82 ~]$ NSS_SDB_USE_CACHE=yes strace -fc -e trace=access curl -s https://www.google.co.jp/ > /dev/null % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 24 21 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 24 21 total |
→効いている