Tag Archives: high load - Page 2

Huge ammount 400 at nginx access.log

I observe alot of 400 at nginx access.log.
After investigation found, that modern browsers open 2+ simultanious connections, but some of them frequently not used for data transfer, so nginx close them by timeout with 400 code at access.log

hereis my session from chrome:

root@ads1-1:~# tail -f /var/log/nginx/access.log | grep 77.232.X.X
77.232.X.X – – [24/Aug/2012:22:40:36 +0400] “-” 400 0 “-” “-”
77.232.X.X – – [24/Aug/2012:22:40:37 +0400] “GET /adnet/css/adpreview/20120621.css HTTP/1.1” 200 7644 “http://smi2.ru/data/pop/gen.inner.php?bl=32380” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1”

So, don`t panic if your found a huge ammount of 400 at access.log

My mysq server databases backup script with Percona

Simple, but working o.k.

#!/bin/bash
BDIR="/home/backup/mysql"
#DATAPATH=`date +%m%d%Y%H%M%S`

# Run backup
/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD --slave-info $BDIR

LASTBACKUP=`ls -1 -t  $BDIR | head -n 1`

/usr/bin/innobackupex --user=root --password=MEGASECUREPASSWORD  --apply-log $BDIR/$LASTBACKUP

netperf – measuring network bandwidth

Netperf is much better way to measure network bandwidth, then using ftp/sftp, as many OPS do.

stx153:~# aptitude search netperf 
p   netperf                                                   - Network performance benchmark                                      
stx153:~# aptitude install netperf

Remove startup links, we don`t need netperf to be started at runtime.

stx153:~# update-rc.d -f netperf remove
 Removing any system startup links for /etc/init.d/netperf ...
   /etc/rc0.d/K20netperf
   /etc/rc1.d/K20netperf
   /etc/rc2.d/S20netperf
   /etc/rc3.d/S20netperf
   /etc/rc4.d/S20netperf
   /etc/rc5.d/S20netperf
   /etc/rc6.d/K20netperf
stx153:~# 
#/etc/init.d/netperf start

How to test:
There are a lot of netperf options, in general, but usually we need only test and CPU.

:~#man netperf
:~# netperf -H server.mydomain.com -c -C
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to server.mydomain.com (10.253.46.1) port 0 AF_INET : demo
Recv   Send    Send                          Utilization       Service Demand
Socket Socket  Message  Elapsed              Send     Recv     Send    Recv
Size   Size    Size     Time     Throughput  local    remote   local   remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % S      us/KB   us/KB
 87380  87380  87380    10.09        86.29   8.67     2.37     65.847  18.012