SlideShare a Scribd company logo
1 of 6
Download to read offline
TCP socket backlog


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü
                Î÷åðåäü íà ñîêåòå

                                                          1K -> 20K rpm
wargaming.net


                      Ïàäàåò êëàñòåð - âñå èäóò íà ñàéò:

                      Èíâàëèäàöèÿ êýøà - âñå æäóò:     20K -> 1K rpm
                Ðåøåíèå:

                net.core.somaxconn = 32768
                net.core.netdev_max_backlog = 32768
                net.ipv4.tcp_max_syn_backlog = 32768


                ÍÅ    UNIX ñîêåò (ECONNREFUSED)


                502 Bad Gateway
conntrack


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü
wargaming.net
                net.ipv4.netfilter.ip_conntrack_max = 294912
                net.ipv4.netfilter.ip_conntrack_count = 294118


                Ïåðåïîëíåíèå:

                [8727241.821130]   ip_conntrack:   table   full,   dropping   packet.
                [8727243.790372]   ip_conntrack:   table   full,   dropping   packet.
                [8727248.908501]   ip_conntrack:   table   full,   dropping   packet.
                [8727253.859720]   ip_conntrack:   table   full,   dropping   packet.
                [8727258.846404]   ip_conntrack:   table   full,   dropping   packet.
                [8727264.276727]   ip_conntrack:   table   full,   dropping   packet.


                Áîëüøîé conntrack (over 300K):                            97.5%si
                Ðåøåíèå: dport 80 -> NOTRACK
TIME_WAIT


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü
                      frontend äëÿ îáùåíèÿ ñ âíåøíèì ìèðîì
wargaming.net

                      áûñòðûé backend (1..10ms)

                      frontend <-> backend HTTP/1.0 (conn per req)

                $ netstat -napt | awk '{print $6}' | sort | uniq -c
                   ...
                   63564 TIME_WAIT

                Íåõâàòêà èñõîäÿùèõ ïîðòîâ!

                Ðåøåíèå:

                net.ipv4.ip_local_port_range = 2000    61000
                net.ipv4.tcp_max_tw_buckets = 131072
                net.ipv4.tcp_tw_recycle = 0
                net.ipv4.tcp_tw_reuse = 1
Out Of TCP Mem


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü
                3494-[9404385.020387] TCP: too many of orphaned sockets
wargaming.net
                3496:[9404390.463850] Out of socket memory


                Äèàãíîñòèêà:

                $ cat /proc/net/sockstat
                sockets: used 7385
                TCP: inuse 5236 orphan 98 tw 2696 alloc 7126 mem 25421
                UDP: inuse 10 mem 0
                RAW: inuse 0
                FRAG: inuse 0 memory 0

                $ /sbin/sysctl -a | grep tcp_mem
                net.ipv4.tcp_mem = 196608 262144 393216

                $ /sbin/sysctl -a | grep orphans
                net.ipv4.tcp_max_orphans = 131072
memcached


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü
wargaming.net
                    ïëîõî ìàñøòàáèðóåòñÿ thread-àìè (-t 64 çëî)

                    8192 pthread mutex íà âñå êëþ÷è,

                    -t 6 - OK! (íå áîëüøå)

                    Nthreads == Ncpu




                Ìàñøòàáèðîâàòü ïðîöåññàìè!
                Êîíñèñòåíòíîå êîëüöî êåøèðîâàíèÿ - íåñêîëüêî èíñòàíñîâ
nscd (bonus)


 5 ïðîáëåì
    ïðè


Àëåêñàíäð
 Êîëåñåíü       Êýøèðîâàíèå îòâåòîâ DNS
wargaming.net




                nscd must have!

More Related Content

What's hot

MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
MongoSF
 
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложенийПрактический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
Olga Lavrentieva
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
Безопасность интернет-приложений осень 2013 лекция 7
Безопасность интернет-приложений осень 2013 лекция 7Безопасность интернет-приложений осень 2013 лекция 7
Безопасность интернет-приложений осень 2013 лекция 7
Technopark
 

What's hot (20)

Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4Installation of application server 10g in red hat 4
Installation of application server 10g in red hat 4
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
 
Triangle OpenStack meetup 09 2013
Triangle OpenStack meetup 09 2013Triangle OpenStack meetup 09 2013
Triangle OpenStack meetup 09 2013
 
mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!
 
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp KrennJavantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
 
Log
LogLog
Log
 
wordpress with nginx on virtualization, jail
wordpress with nginx on virtualization, jailwordpress with nginx on virtualization, jail
wordpress with nginx on virtualization, jail
 
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложенийПрактический опыт профайлинга и оптимизации производительности Ruby-приложений
Практический опыт профайлинга и оптимизации производительности Ruby-приложений
 
Uable to do ssh from the RedHat Linux machine to Netapp filer 7 mode storage ...
Uable to do ssh from the RedHat Linux machine to Netapp filer 7 mode storage ...Uable to do ssh from the RedHat Linux machine to Netapp filer 7 mode storage ...
Uable to do ssh from the RedHat Linux machine to Netapp filer 7 mode storage ...
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
Bsides final
Bsides finalBsides final
Bsides final
 
XS Japan 2008 Isolation Japanese
XS Japan 2008 Isolation JapaneseXS Japan 2008 Isolation Japanese
XS Japan 2008 Isolation Japanese
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
 
Linux Server Start
Linux Server StartLinux Server Start
Linux Server Start
 
TechTalkThursday 29.06.2017: Wie verhält sich DDoS in der Realität?
TechTalkThursday 29.06.2017: Wie verhält sich DDoS in der Realität?TechTalkThursday 29.06.2017: Wie verhält sich DDoS in der Realität?
TechTalkThursday 29.06.2017: Wie verhält sich DDoS in der Realität?
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Безопасность интернет-приложений осень 2013 лекция 7
Безопасность интернет-приложений осень 2013 лекция 7Безопасность интернет-приложений осень 2013 лекция 7
Безопасность интернет-приложений осень 2013 лекция 7
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 

Viewers also liked

071310 obama email (polish)
071310   obama email (polish)071310   obama email (polish)
071310 obama email (polish)
VogelDenise
 
031808 obama speech (bengali)
031808   obama speech (bengali)031808   obama speech (bengali)
031808 obama speech (bengali)
VogelDenise
 
092712 julian assange (president obama's audacity) -romanian
092712   julian assange (president obama's audacity) -romanian092712   julian assange (president obama's audacity) -romanian
092712 julian assange (president obama's audacity) -romanian
VogelDenise
 
031808 obama speech (basque)
031808   obama speech (basque)031808   obama speech (basque)
031808 obama speech (basque)
VogelDenise
 
092712 julian assange (president obama's audacity) - afrikaans
092712   julian assange (president obama's audacity) - afrikaans092712   julian assange (president obama's audacity) - afrikaans
092712 julian assange (president obama's audacity) - afrikaans
VogelDenise
 
122912 public notification (obama & pay pal attacks) -japanese
122912   public notification (obama & pay pal attacks) -japanese122912   public notification (obama & pay pal attacks) -japanese
122912 public notification (obama & pay pal attacks) -japanese
VogelDenise
 
122912 public notification (obama & pay pal attacks) -norwegian
122912   public notification (obama & pay pal attacks) -norwegian122912   public notification (obama & pay pal attacks) -norwegian
122912 public notification (obama & pay pal attacks) -norwegian
VogelDenise
 
122312 obama fax (danish)
122312   obama fax (danish)122312   obama fax (danish)
122312 obama fax (danish)
VogelDenise
 
INTERPOL - Bringing The United States of America's Corrupt Officials To Justice
INTERPOL - Bringing The United States of America's Corrupt Officials To JusticeINTERPOL - Bringing The United States of America's Corrupt Officials To Justice
INTERPOL - Bringing The United States of America's Corrupt Officials To Justice
VogelDenise
 
122912 public notification (obama & pay pal attacks) -welsh
122912   public notification (obama & pay pal attacks) -welsh122912   public notification (obama & pay pal attacks) -welsh
122912 public notification (obama & pay pal attacks) -welsh
VogelDenise
 
Nuremberg principle armenian
Nuremberg principle   armenianNuremberg principle   armenian
Nuremberg principle armenian
VogelDenise
 
10/01/12 Obama REALITY CHECK Update (ENGLISH)
10/01/12 Obama REALITY CHECK Update (ENGLISH)10/01/12 Obama REALITY CHECK Update (ENGLISH)
10/01/12 Obama REALITY CHECK Update (ENGLISH)
VogelDenise
 
100112 obama reality check (update)-indonesian
100112 obama   reality check (update)-indonesian100112 obama   reality check (update)-indonesian
100112 obama reality check (update)-indonesian
VogelDenise
 
092812 david addington article (arabic)
092812   david addington article (arabic)092812   david addington article (arabic)
092812 david addington article (arabic)
VogelDenise
 
100112 obama reality check (update)-afrikaans
100112 obama   reality check (update)-afrikaans100112 obama   reality check (update)-afrikaans
100112 obama reality check (update)-afrikaans
VogelDenise
 
GEORGE ZIMMERMAN'S RE-ENACTMENT (gujarati)
GEORGE ZIMMERMAN'S RE-ENACTMENT   (gujarati)GEORGE ZIMMERMAN'S RE-ENACTMENT   (gujarati)
GEORGE ZIMMERMAN'S RE-ENACTMENT (gujarati)
VogelDenise
 
GEORGE ZIMMERMAN'S RE-ENACTMENT (belarusian)
GEORGE ZIMMERMAN'S RE-ENACTMENT  (belarusian)GEORGE ZIMMERMAN'S RE-ENACTMENT  (belarusian)
GEORGE ZIMMERMAN'S RE-ENACTMENT (belarusian)
VogelDenise
 

Viewers also liked (20)

071310 obama email (polish)
071310   obama email (polish)071310   obama email (polish)
071310 obama email (polish)
 
031808 obama speech (bengali)
031808   obama speech (bengali)031808   obama speech (bengali)
031808 obama speech (bengali)
 
092712 julian assange (president obama's audacity) -romanian
092712   julian assange (president obama's audacity) -romanian092712   julian assange (president obama's audacity) -romanian
092712 julian assange (president obama's audacity) -romanian
 
031808 obama speech (basque)
031808   obama speech (basque)031808   obama speech (basque)
031808 obama speech (basque)
 
092712 julian assange (president obama's audacity) - afrikaans
092712   julian assange (president obama's audacity) - afrikaans092712   julian assange (president obama's audacity) - afrikaans
092712 julian assange (president obama's audacity) - afrikaans
 
122912 public notification (obama & pay pal attacks) -japanese
122912   public notification (obama & pay pal attacks) -japanese122912   public notification (obama & pay pal attacks) -japanese
122912 public notification (obama & pay pal attacks) -japanese
 
122912 public notification (obama & pay pal attacks) -norwegian
122912   public notification (obama & pay pal attacks) -norwegian122912   public notification (obama & pay pal attacks) -norwegian
122912 public notification (obama & pay pal attacks) -norwegian
 
B. Smith Home by Hammary
B. Smith Home by HammaryB. Smith Home by Hammary
B. Smith Home by Hammary
 
122312 obama fax (danish)
122312   obama fax (danish)122312   obama fax (danish)
122312 obama fax (danish)
 
INTERPOL - Bringing The United States of America's Corrupt Officials To Justice
INTERPOL - Bringing The United States of America's Corrupt Officials To JusticeINTERPOL - Bringing The United States of America's Corrupt Officials To Justice
INTERPOL - Bringing The United States of America's Corrupt Officials To Justice
 
122912 public notification (obama & pay pal attacks) -welsh
122912   public notification (obama & pay pal attacks) -welsh122912   public notification (obama & pay pal attacks) -welsh
122912 public notification (obama & pay pal attacks) -welsh
 
Nuremberg principle armenian
Nuremberg principle   armenianNuremberg principle   armenian
Nuremberg principle armenian
 
10/01/12 Obama REALITY CHECK Update (ENGLISH)
10/01/12 Obama REALITY CHECK Update (ENGLISH)10/01/12 Obama REALITY CHECK Update (ENGLISH)
10/01/12 Obama REALITY CHECK Update (ENGLISH)
 
B.Smith Rugs
B.Smith RugsB.Smith Rugs
B.Smith Rugs
 
100112 obama reality check (update)-indonesian
100112 obama   reality check (update)-indonesian100112 obama   reality check (update)-indonesian
100112 obama reality check (update)-indonesian
 
092812 david addington article (arabic)
092812   david addington article (arabic)092812   david addington article (arabic)
092812 david addington article (arabic)
 
100112 obama reality check (update)-afrikaans
100112 obama   reality check (update)-afrikaans100112 obama   reality check (update)-afrikaans
100112 obama reality check (update)-afrikaans
 
GEORGE ZIMMERMAN'S RE-ENACTMENT (gujarati)
GEORGE ZIMMERMAN'S RE-ENACTMENT   (gujarati)GEORGE ZIMMERMAN'S RE-ENACTMENT   (gujarati)
GEORGE ZIMMERMAN'S RE-ENACTMENT (gujarati)
 
BAKER DONELSON - Attorney Layoffs The SINKING OF A TERRORIST REGIME (ESPERANTO)
BAKER DONELSON - Attorney Layoffs The SINKING OF A TERRORIST REGIME (ESPERANTO)BAKER DONELSON - Attorney Layoffs The SINKING OF A TERRORIST REGIME (ESPERANTO)
BAKER DONELSON - Attorney Layoffs The SINKING OF A TERRORIST REGIME (ESPERANTO)
 
GEORGE ZIMMERMAN'S RE-ENACTMENT (belarusian)
GEORGE ZIMMERMAN'S RE-ENACTMENT  (belarusian)GEORGE ZIMMERMAN'S RE-ENACTMENT  (belarusian)
GEORGE ZIMMERMAN'S RE-ENACTMENT (belarusian)
 

Similar to 5 issues

Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
Ontico
 
Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopen
Hajime Tazaki
 

Similar to 5 issues (20)

T.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - PreyT.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - Prey
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use Them
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
Open stack advanced_part
Open stack advanced_partOpen stack advanced_part
Open stack advanced_part
 
Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attack
 
Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopen
 
Real-time in the real world: DIRT in production
Real-time in the real world: DIRT in productionReal-time in the real world: DIRT in production
Real-time in the real world: DIRT in production
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems Performance
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Ipv6 test plan for opnfv poc v2.2 spirent-vctlab
Ipv6 test plan for opnfv poc v2.2 spirent-vctlabIpv6 test plan for opnfv poc v2.2 spirent-vctlab
Ipv6 test plan for opnfv poc v2.2 spirent-vctlab
 
QCon 2015 Broken Performance Tools
QCon 2015 Broken Performance ToolsQCon 2015 Broken Performance Tools
QCon 2015 Broken Performance Tools
 
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
 
Disruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on LinuxDisruptive IP Networking with Intel DPDK on Linux
Disruptive IP Networking with Intel DPDK on Linux
 
DDoS: Practical Survival Guide
DDoS: Practical Survival GuideDDoS: Practical Survival Guide
DDoS: Practical Survival Guide
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

5 issues

  • 1. TCP socket backlog 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü Î÷åðåäü íà ñîêåòå 1K -> 20K rpm wargaming.net Ïàäàåò êëàñòåð - âñå èäóò íà ñàéò: Èíâàëèäàöèÿ êýøà - âñå æäóò: 20K -> 1K rpm Ðåøåíèå: net.core.somaxconn = 32768 net.core.netdev_max_backlog = 32768 net.ipv4.tcp_max_syn_backlog = 32768 ÍÅ UNIX ñîêåò (ECONNREFUSED) 502 Bad Gateway
  • 2. conntrack 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü wargaming.net net.ipv4.netfilter.ip_conntrack_max = 294912 net.ipv4.netfilter.ip_conntrack_count = 294118 Ïåðåïîëíåíèå: [8727241.821130] ip_conntrack: table full, dropping packet. [8727243.790372] ip_conntrack: table full, dropping packet. [8727248.908501] ip_conntrack: table full, dropping packet. [8727253.859720] ip_conntrack: table full, dropping packet. [8727258.846404] ip_conntrack: table full, dropping packet. [8727264.276727] ip_conntrack: table full, dropping packet. Áîëüøîé conntrack (over 300K): 97.5%si Ðåøåíèå: dport 80 -> NOTRACK
  • 3. TIME_WAIT 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü frontend äëÿ îáùåíèÿ ñ âíåøíèì ìèðîì wargaming.net áûñòðûé backend (1..10ms) frontend <-> backend HTTP/1.0 (conn per req) $ netstat -napt | awk '{print $6}' | sort | uniq -c ... 63564 TIME_WAIT Íåõâàòêà èñõîäÿùèõ ïîðòîâ! Ðåøåíèå: net.ipv4.ip_local_port_range = 2000 61000 net.ipv4.tcp_max_tw_buckets = 131072 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1
  • 4. Out Of TCP Mem 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü 3494-[9404385.020387] TCP: too many of orphaned sockets wargaming.net 3496:[9404390.463850] Out of socket memory Äèàãíîñòèêà: $ cat /proc/net/sockstat sockets: used 7385 TCP: inuse 5236 orphan 98 tw 2696 alloc 7126 mem 25421 UDP: inuse 10 mem 0 RAW: inuse 0 FRAG: inuse 0 memory 0 $ /sbin/sysctl -a | grep tcp_mem net.ipv4.tcp_mem = 196608 262144 393216 $ /sbin/sysctl -a | grep orphans net.ipv4.tcp_max_orphans = 131072
  • 5. memcached 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü wargaming.net ïëîõî ìàñøòàáèðóåòñÿ thread-àìè (-t 64 çëî) 8192 pthread mutex íà âñå êëþ÷è, -t 6 - OK! (íå áîëüøå) Nthreads == Ncpu Ìàñøòàáèðîâàòü ïðîöåññàìè! Êîíñèñòåíòíîå êîëüöî êåøèðîâàíèÿ - íåñêîëüêî èíñòàíñîâ
  • 6. nscd (bonus) 5 ïðîáëåì ïðè Àëåêñàíäð Êîëåñåíü Êýøèðîâàíèå îòâåòîâ DNS wargaming.net nscd must have!