Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2014-05-19 06:09:18

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Statystyki w netstat

Czy bylibyście tak uprzejmi i wrzucili tutaj wyniki poniższego polecenia?

Kod:

$ netstat -s

Dodatkowo, prosiłbym o informacje na temat przepustowości łącza (down/up), ilości dostępnej pamięci RAM i czy macie NAT. Ponadto pokażcie wyniki:

Kod:

# sysctl -a | egrep -i "rmem|wmem|tcp_mem"

Staty dobrze jest generować gdy system jest online przez co najmniej 4-6h, najlepiej 12 lub dłużej, ew. dajcie znać odnośnie uptime. Jeśli macie odpalone p2p, dobrze jest też zaznaczyć to i najlepiej przeprowadzić dwa testy -- jeden z p2p włączonym, a drugi bez p2p.

Z tego co zaobserwowałem po odpaleniu torrenta, jakoś połączeń drastycznie się obniża -- gwałtownie rośnie liczba retransmisji i nieudanych prób połączeń. Chodzi generalnie o określenie jak często takie niepożądane efekty występują i jakie wartości są do zaakceptowania. Być może da radę obniżyć liczbę błędów transmisyjnych  tuningując kernel, może winny jest sprzęt albo zła konfiguracja sieci, etc. W każdym razie info z powyższych poleceń pomoże mi w ustaleniu czy mój net ssie bardziej niż u innych. xD

Ostatnio edytowany przez morfik (2014-05-19 06:11:50)

Offline

 

#2  2014-05-19 06:18:16

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Statystyki w netstat

Był tu gdzieś na forum skrypt, który wyłączał kompa, kiedy torrent kończył pobieranie,  to było o tyle mądrzejsze rozwiązanie, ze czytał bezpośrednio z /proc/net/dev.

Torrent? nawet, jak mu obetniesz prędkość, to on może wykorzystać liczbę jednoczesnych połączeń  do sieci, i wtedy pomimo limitu prędkości net się zacina.
W dodatku operatorzy netu obcinają torrenta jak się da, i być może te ograniczenia robiły jakieś lamy, albo sprzęt nawala, i w rezultacie sieć chodzi nie zupełnie tak, jak powinna.
Nie ma sieci idealnych.

Kod:

sysctl -a | egrep -i "rmem|wmem|tcp_mem"
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_mem = 524288    524288    524288
net.ipv4.tcp_rmem = 4096    87380    524288
net.ipv4.tcp_wmem = 4096    87380    524288
net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_wmem_min = 4096
net.sctp.sctp_rmem = 4096    865500    4023296
net.sctp.sctp_wmem = 4096    16384    4023296
vm.lowmem_reserve_ratio = 256    256    32

Kod:

netstat -s
Ip:
    242297 total packets received
    0 forwarded
    0 incoming packets discarded
    241677 incoming packets delivered
    136042 requests sent out
    12 outgoing packets dropped
Icmp:
    258 ICMP messages received
    14 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 256
        echo replies: 2
    36 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 34
        echo request: 2
IcmpMsg:
        InType0: 2
        InType3: 256
        OutType3: 34
        OutType8: 2
Tcp:
    723 active connections openings
    5 passive connection openings
    11 failed connection attempts
    7 connection resets received
    23 connections established
    239288 segments received
    133252 segments send out
    140 segments retransmited
    11 bad segments received.
    11 resets sent
Udp:
    2107 packets received
    24 packets to unknown port received.
    0 packet receive errors
    2498 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    256 TCP sockets finished time wait in fast timer
    17932 delayed acks sent
    13 delayed acks further delayed because of locked socket
    Quick ack mode was activated 114 times
    591 packets directly queued to recvmsg prequeue.
    12619 bytes directly in process context from backlog
    335087 bytes directly received in process context from prequeue
    91263 packet headers predicted
    160 packets header predicted and directly queued to user
    1415 acknowledgments not containing data payload received
    1524 predicted acknowledgments
    32 congestion windows recovered without slow start after partial ack
    1 timeouts in loss state
    69 other TCP timeouts
    TCPLossProbes: 59
    TCPLossProbeRecovery: 59
    1261 DSACKs sent for old packets
    141 DSACKs sent for out of order packets
    63 DSACKs received
    15 connections reset due to unexpected data
    6 connections reset due to early user close
    7 connections aborted due to timeout
    TCPDSACKIgnoredNoUndo: 37
    TCPSackShiftFallback: 7
    IPReversePathFilter: 175
    TCPRcvCoalesce: 201146
    TCPOFOQueue: 70906
    TCPOFOMerge: 78
    TCPChallengeACK: 12
    TCPSYNChallenge: 11
IpExt:
    OutMcastPkts: 2
    InBcastPkts: 361
    InOctets: 341741300
    OutOctets: 7810427
    OutMcastOctets: 321
    InBcastOctets: 155832
    InNoECTPkts: 242297

Netstat do statystyk się nadaje, jak młotek blacharski do nosa.
Lepiej poszukać jakiegoś skrypta do mrtg.

Ostatnio edytowany przez Jacekalex (2014-05-19 06:21:26)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#3  2014-05-19 06:46:15

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

Był tu gdzieś na forum skrypt, który wyłączał kompa, kiedy torrent kończył pobieranie[/quote]
To chyba ma każdy klient torrenta zaimplementowane standardowo

U mnie sieć chyba działa bez zarzutu (po wdrożeniu traffic control), jednak liczba retransmisji i nieudanych prób połączeń na poziomie 0.1-1% nie jest chyba tym czego należy oczekiwać. Fakt jest, że to dotyczy głównie p2p. Jak mi liczniki trochę nabiją to zrobię zrzuty i sobie porównam.

Rzucę też okiem na ten mrtg jak będę miał chwilę.

Jacekalex mógł jeszcze powiedzieć jaki masz net i ile masz ramu i czy masz NAT?

Offline

 

#4  2014-05-19 06:51:27

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Statystyki w netstat

Połączenie pppoe, ram 4GB, na drugim końcu kabla, za iluśtam switchami stoi jakiś  Juniper z softem JunosOS bazującym na FreeBSD.
NATu nie widzę, żadnego, mam publiczny IP.


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#5  2014-05-19 06:57:58

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

A jaka przepustowość? xD

Offline

 

#6  2014-05-19 07:08:09

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Statystyki w netstat

Na umowie pisze 30 Mbit, faktycznie przy 1,6 MB/s co kilkadziesiąt MB zdycha połączenie, zazwyczaj starcza restart połączenia.

W biurze ISP widzę tylko głupie miny, u mnie identycznie to działa na Gentoo i Debianie, demona pppd sobie w końcu tak ustawiłem, że robi automatyczny reconnect po kilku sekundach od rozłączenia.

Konfig:

Kod:

noipdefault
defaultroute
hide-password
lcp-echo-failure 1
lcp-echo-adaptive
noauth
persist
lock
holdoff 3
plugin rp-pppoe.so
nic-net
user "{username}"

Pozdro
;-)

Ostatnio edytowany przez Jacekalex (2014-05-19 07:09:51)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#7  2014-05-19 08:11:02

  darius - Użytkownik

darius
Użytkownik
Skąd: Paryz/Wilanow
Zarejestrowany: 2014-03-21

Re: Statystyki w netstat

Dla porownania

Kod:

netstat -s
Ip:
    3396 total packets received
    0 forwarded
    0 incoming packets discarded
    3394 incoming packets delivered
    3554 requests sent out
    24 dropped because of missing route
Icmp:
    0 ICMP messages received
    0 input ICMP message failed.
    Histogramme d'entrée ICMP
    0 ICMP messages sent
    0 ICMP messages failed
    Histogramme de sortie ICMP
Tcp:
    279 active connections openings
    0 passive connection openings
    12 failed connection attempts
    3 connection resets received
    10 connections established
    3746 segments received
    3727 segments send out
    268 segments retransmited
    38 bad segments received.
    48 resets sent
Udp:
    188 packets received
    0 packets to unknown port received.
    0 packet receive errors
    145 packets sent
UdpLite:
TcpExt:
    74 TCP sockets finished time wait in fast timer
    89 delayed acks sent
    Quick ack mode was activated 6 times
    1742 packet headers predicted
    559 acknowledgments not containing data payload received
    160 predicted acknowledgments
    6 congestion windows recovered without slow start after partial ack
    69 other TCP timeouts
    TCPLossProbes: 27
    TCPLossProbeRecovery: 7
    6 DSACKs sent for old packets
    19 connections reset due to unexpected data
    1 connections reset due to early user close
    4 connections aborted due to timeout
    TCPRcvCoalesce: 770
    TCPOFOQueue: 21
    TCPChallengeACK: 38
    TCPSYNChallenge: 38
IpExt:
    InNoRoutes: 2
    InMcastPkts: 52
    OutMcastPkts: 11
    InBcastPkts: 4
    InOctets: 5542068
    OutOctets: 651277
    InMcastOctets: 10005
    OutMcastOctets: 3083
    InBcastOctets: 958
    InNoECTPkts: 5470

uptime

Kod:

uptime
 08:00:29 up 26 min,  4 users,  load average: 0,21, 0,12, 0,12

Swiatlowody /fibra optyczna,  ram 4GB, przepustowosc okolo 10 MB/s (download) i 2,5 MB/s (upload) czasem zwykly film 675 MB/Mo wpada do 2 minut (jak nie blokuja)

Kod:

sysctl -a | egrep -i "rmem|wmem|tcp_mem"
net.core.rmem_default = 212992
net.core.rmem_max = 212992
net.core.wmem_default = 212992
net.core.wmem_max = 212992
net.ipv4.tcp_mem = 93156    124210    186312
net.ipv4.tcp_rmem = 4096    87380    6291456
net.ipv4.tcp_wmem = 4096    16384    4194304
net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_wmem_min = 4096
vm.lowmem_reserve_ratio = 256    256    32

Na wszelki wypadek przed chwila aktualizowalem jadro 3.14

Ostatnio edytowany przez darius (2014-05-19 08:38:56)


Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

Offline

 

#8  2014-05-19 09:48:55

  qluk - Pan inż. Cyc

qluk
Pan inż. Cyc
Skąd: Katowice
Zarejestrowany: 2006-05-22

Re: Statystyki w netstat

Czas pracy mały bo był update

Kod:

$ uptime
 9:44AM  up 15 days, 18:37, 1 user, load averages: 0.12, 0.17, 0.13

100/100mbps

Kod:

$ netstat -s
tcp:
    167928 packets sent
        158668 data packets (42269498 bytes)
        3759 data packets (60557 bytes) retransmitted
        1 data packet unnecessarily retransmitted
        0 resends initiated by MTU discovery
        97847 ack-only packets (0 delayed)
        0 URG only packets
        0 window probe packets
        5750 window update packets
        7982 control packets
    532814 packets received
        51304 acks (for 42205579 bytes)
        5722 duplicate acks
        0 acks for unsent data
        87165 packets (97217497 bytes) received in-sequence
        176 completely duplicate packets (2083 bytes)
        0 old duplicate packets
        0 packets with some dup. data (0 bytes duped)
        79 out-of-order packets (114392 bytes)
        0 packets (0 bytes) of data after window
        0 window probes
        15 window update packets
        6 packets received after close
        150 discarded for bad checksums
        0 discarded for bad header offset fields
        0 discarded because packet too short
        0 discarded due to memory problems
    1503 connection requests
    6651 connection accepts
    0 bad connection attempts
    0 listen queue overflows
    1092 ignored RSTs in the windows
    6718 connections established (including accepts)
    8152 connections closed (including 336 drops)
        873 connections updated cached RTT on close
        875 connections updated cached RTT variance on close
        128 connections updated cached ssthresh on close
    435 embryonic connections dropped
    49374 segments updated rtt (of 34009 attempts)
    3703 retransmit timeouts
        17 connections dropped by rexmit timeout
    0 persist timeouts
        0 connections dropped by persist timeout
    0 Connections (fin_wait_2) dropped because of timeout
    435 keepalive timeouts
        0 keepalive probes sent
        435 connections dropped by keepalive
    9888 correct ACK header predictions
    78432 correct data packet header predictions
    6709 syncache entries added
        66 retransmitted
        3 dupsyn
        0 dropped
        6651 completed
        0 bucket overflow
        0 cache overflow
        37 reset
        21 stale
        0 aborted
        0 badack
        0 unreach
        0 zone failures
    6709 cookies sent
    0 cookies received
    34 hostcache entries added
        0 bucket overflow
    1 SACK recovery episode
    1 segment rexmit in SACK recovery episodes
    1348 byte rexmits in SACK recovery episodes
    32 SACK options (SACK blocks) received
    84 SACK options (SACK blocks) sent
    0 SACK scoreboard overflow
    0 packets with ECN CE bit set
    0 packets with ECN ECT(0) bit set
    0 packets with ECN ECT(1) bit set
    0 successful ECN handshakes
    0 times ECN reduced the congestion window
udp:
    1719448 datagrams received
    0 with incomplete header
    0 with bad data length field
    85 with bad checksum
    15 with no checksum
    599050 dropped due to no socket
    191898 broadcast/multicast datagrams undelivered
    0 dropped due to full socket buffers
    0 not for hashed pcb
    928415 delivered
    1568857 datagrams output
    0 times multicast source filter matched
sctp:
    0 input packets
        0 datagrams
        0 packets that had data
        0 input SACK chunks
        0 input DATA chunks
        0 duplicate DATA chunks
        0 input HB chunks
        0 HB-ACK chunks
        0 input ECNE chunks
        0 input AUTH chunks
        0 chunks missing AUTH
        0 invalid HMAC ids received
        0 invalid secret ids received
        0 auth failed
        0 fast path receives all one chunk
        0 fast path multi-part data
    0 output packets
        0 output SACKs
        0 output DATA chunks
        0 retransmitted DATA chunks
        0 fast retransmitted DATA chunks
        0 FR's that happened more than once to same chunk
        0 output HB chunks
        0 output ECNE chunks
        0 output AUTH chunks
        0 ip_output error counter
    Packet drop statistics:
        0 from middle box
        0 from end host
        0 with data
        0 non-data, non-endhost
        0 non-endhost, bandwidth rep only
        0 not enough for chunk header
        0 not enough data to confirm
        0 where process_chunk_drop said break
        0 failed to find TSN
        0 attempt reverse TSN lookup
        0 e-host confirms zero-rwnd
        0 midbox confirms no space
        0 data did not match TSN
        0 TSN's marked for Fast Retran
    Timeouts:
        0 iterator timers fired
        0 T3 data time outs
        0 window probe (T3) timers fired
        0 INIT timers fired
        0 sack timers fired
        0 shutdown timers fired
        0 heartbeat timers fired
        0 a cookie timeout fired
        0 an endpoint changed its cookiesecret
        0 PMTU timers fired
        0 shutdown ack timers fired
        0 shutdown guard timers fired
        0 stream reset timers fired
        0 early FR timers fired
        0 an asconf timer fired
        0 auto close timer fired
        0 asoc free timers expired
        0 inp free timers expired
    0 packet shorter than header
    0 checksum error
    0 no endpoint for port
    0 bad v-tag
    0 bad SID
    0 no memory
    0 number of multiple FR in a RTT window
    0 RFC813 allowed sending
    0 RFC813 does not allow sending
    0 times max burst prohibited sending
    0 look ahead tells us no memory in interface
    0 numbers of window probes sent
    0 times an output error to clamp down on next user send
    0 times sctp_senderrors were caused from a user
    0 number of in data drops due to chunk limit reached
    0 number of in data drops due to rwnd limit reached
    0 times a ECN reduced the cwnd
    0 used express lookup via vtag
    0 collision in express lookup
    0 times the sender ran dry of user data on primary
    0 same for above
    0 sacks the slow way
    0 window update only sacks sent
    0 sends with sinfo_flags !=0
    0 unordered sends
    0 sends with EOF flag set
    0 sends with ABORT flag set
    208 times protocol drain called
    0 times we did a protocol drain
    0 times recv was called with peek
    0 cached chunks used
    0 cached stream oq's used
    0 unread messages abandonded by close
    0 send burst avoidance, already max burst inflight to net
    0 send cwnd full avoidance, already max burst inflight to net
    0 number of map array over-runs via fwd-tsn's
ip:
    187614644 total packets received
    0 bad header checksums
    0 with size smaller than minimum
    0 with data size < data length
    0 with ip length > max ip packet size
    0 with header length < data size
    0 with data length < header length
    0 with bad options
    0 with incorrect version number
    0 fragments received
    0 fragments dropped (dup or out of space)
    0 fragments dropped after timeout
    0 packets reassembled ok
    3614327 packets for this host
    98677 packets for unknown/unsupported protocol
    126871467 packets forwarded (0 packets fast forwarded)
    120391 packets not forwardable
    0 packets received for unknown multicast group
    0 redirects sent
    3210089 packets sent from this host
    0 packets sent with fabricated ip header
    0 output packets dropped due to no bufs, etc.
    0 output packets discarded due to no route
    71 output datagrams fragmented
    259 fragments created
    0 datagrams that can't be fragmented
    0 tunneling packets that can't find gif
    746 datagrams with bad address in header
icmp:
    108468 calls to icmp_error
    0 errors not generated in response to an icmp message
    Output histogram:
        echo reply: 114
        destination unreachable: 108468
    0 messages with bad code fields
    0 messages less than the minimum length
    348 messages with bad checksum
    0 messages with bad length
    0 multicast echo requests ignored
    0 multicast timestamp requests ignored
    Input histogram:
        echo reply: 1361396
        destination unreachable: 554
        echo: 114
        time exceeded: 1
    114 message responses generated
    0 invalid return addresses
    0 no return routes
    ICMP address mask responses are disabled
igmp:
    90901 messages received
    0 messages received with too few bytes
    0 messages received with wrong TTL
    0 messages received with bad checksum
    90901 V1/V2 membership queries received
    0 V3 membership queries received
    0 membership queries received with invalid field(s)
    90898 general queries received
    3 group queries received
    0 group-source queries received
    0 group-source queries dropped
    0 membership reports received
    0 membership reports received with invalid field(s)
    0 membership reports received for groups to which we belong
    0 V3 reports received without Router Alert
    0 membership reports sent
ipsec:
    0 inbound packets processed successfully
    0 inbound packets violated process security policy
    0 inbound packets with no SA available
    0 invalid inbound packets
    0 inbound packets failed due to insufficient memory
    0 inbound packets failed getting SPI
    0 inbound packets failed on AH replay check
    0 inbound packets failed on ESP replay check
    0 inbound packets considered authentic
    0 inbound packets failed on authentication
    0 outbound packets processed successfully
    0 outbound packets violated process security policy
    0 outbound packets with no SA available
    0 invalid outbound packets
    0 outbound packets failed due to insufficient memory
    0 outbound packets with no route
    0 SPD cache lookups
    0 SPD cache misses
    0 inbound packets violated process security policy
    0 outbound packets violated process security policy
    0 outbound packets with no SA available
    0 outbound packets failed due to insufficient memory
    0 outbound packets with no route available
    0 invalid outbound packets
    0 outbound packets with bundled SAs
    0 mbufs coalesced during clone
    0 clusters coalesced during clone
    0 clusters copied during clone
    0 mbufs inserted during makespace
ah:
    0 packets shorter than header shows
    0 packets dropped; protocol family not supported
    0 packets dropped; no TDB
    0 packets dropped; bad KCR
    0 packets dropped; queue full
    0 packets dropped; no transform
    0 replay counter wraps
    0 packets dropped; bad authentication detected
    0 packets dropped; bad authentication length
    0 possible replay packets detected
    0 packets in
    0 packets out
    0 packets dropped; invalid TDB
    0 bytes in
    0 bytes out
    0 packets dropped; larger than IP_MAXPACKET
    0 packets blocked due to policy
    0 crypto processing failures
    0 tunnel sanity check failures
esp:
    0 packets shorter than header shows
    0 packets dropped; protocol family not supported
    0 packets dropped; no TDB
    0 packets dropped; bad KCR
    0 packets dropped; queue full
    0 packets dropped; no transform
    0 packets dropped; bad ilen
    0 replay counter wraps
    0 packets dropped; bad encryption detected
    0 packets dropped; bad authentication detected
    0 possible replay packets detected
    0 packets in
    0 packets out
    0 packets dropped; invalid TDB
    0 bytes in
    0 bytes out
    0 packets dropped; larger than IP_MAXPACKET
    0 packets blocked due to policy
    0 crypto processing failures
    0 tunnel sanity check failures
ipcomp:
    0 packets shorter than header shows
    0 packets dropped; protocol family not supported
    0 packets dropped; no TDB
    0 packets dropped; bad KCR
    0 packets dropped; queue full
    0 packets dropped; no transform
    0 replay counter wraps
    0 packets in
    0 packets out
    0 packets dropped; invalid TDB
    0 bytes in
    0 bytes out
    0 packets dropped; larger than IP_MAXPACKET
    0 packets blocked due to policy
    0 crypto processing failures
    0 packets sent uncompressed; size < compr. algo. threshold
    0 packets sent uncompressed; compression was useless
pim:
    0 messages received
    0 bytes received
    0 messages received with too few bytes
    0 messages received with bad checksum
    0 messages received with bad version
    0 data register messages received
    0 data register bytes received
    0 data register messages received on wrong iif
    0 bad registers received
    0 data register messages sent
    0 data register bytes sent
carp:
    0 packets received (IPv4)
    0 packets received (IPv6)
        0 packets discarded for wrong TTL
        0 packets shorter than header
        0 discarded for bad checksums
        0 discarded packets with a bad version
        0 discarded because packet too short
        0 discarded for bad authentication
        0 discarded for bad vhid
        0 discarded because of a bad address list
    0 packets sent (IPv4)
    0 packets sent (IPv6)
        0 send failed due to mbuf memory error
pfsync:
    0 packets received (IPv4)
    0 packets received (IPv6)
        0 packets discarded for bad interface
        0 packets discarded for bad ttl
        0 packets shorter than header
        0 packets discarded for bad version
        0 packets discarded for bad HMAC
        0 packets discarded for bad action
        0 packets discarded for short packet
        0 states discarded for bad values
        0 stale states
        0 failed state lookup/inserts
    0 packets sent (IPv4)
    0 packets sent (IPv6)
        0 send failed due to mbuf memory error
        0 send error
arp:
    100999 ARP requests sent
    37845 ARP replies sent
    1272253 ARP requests received
    801 ARP replies received
    1273054 ARP packets received
    122963 total packets dropped due to no ARP entry
    9471 ARP entrys timed out
    1 Duplicate IP seen
ip6:
    596 total packets received
    0 with size smaller than minimum
    0 with data size < data length
    0 with bad options
    0 with incorrect version number
    0 fragments received
    0 fragments dropped (dup or out of space)
    0 fragments dropped after timeout
    0 fragments that exceeded limit
    0 packets reassembled ok
    538 packets for this host
    0 packets forwarded
    0 packets not forwardable
    0 redirects sent
    8 packets sent from this host
    0 packets sent with fabricated ip header
    0 output packets dropped due to no bufs, etc.
    19 output packets discarded due to no route
    0 output datagrams fragmented
    0 fragments created
    0 datagrams that can't be fragmented
    0 packets that violated scope rules
    538 multicast packets which we don't join
    Input histogram:
        UDP: 8
        ICMP6: 588
    Mbuf statistics:
        0 one mbuf
        596 one ext mbuf
        0 two or more ext mbuf
    0 packets whose headers are not continuous
    0 tunneling packets that can't find gif
    0 packets discarded because of too many headers
    0 failures of source address selection
    Source addresses selection rule applied:
icmp6:
    0 calls to icmp6_error
    0 errors not generated in response to an icmp6 message
    0 errors not generated because of rate limitation
    Output histogram:
        neighbor solicitation: 2
        MLDv2 listener report: 6
    0 messages with bad code fields
    0 messages < minimum length
    0 bad checksums
    0 messages with bad length
    Input histogram:
        neighbor advertisement: 50
    Histogram of error messages to be generated:
        0 no route
        0 administratively prohibited
        0 beyond scope
        0 address unreachable
        0 port unreachable
        0 packet too big
        0 time exceed transit
        0 time exceed reassembly
        0 erroneous header field
        0 unrecognized next header
        0 unrecognized option
        0 redirect
        0 unknown
    0 message responses generated
    0 messages with too many ND options
    0 messages with bad ND options
    0 bad neighbor solicitation messages
    0 bad neighbor advertisement messages
    0 bad router solicitation messages
    0 bad router advertisement messages
    0 bad redirect messages
    0 path MTU changes
ipsec6:
    0 inbound packets processed successfully
    0 inbound packets violated process security policy
    0 inbound packets with no SA available
    0 invalid inbound packets
    0 inbound packets failed due to insufficient memory
    0 inbound packets failed getting SPI
    0 inbound packets failed on AH replay check
    0 inbound packets failed on ESP replay check
    0 inbound packets considered authentic
    0 inbound packets failed on authentication
    0 outbound packets processed successfully
    0 outbound packets violated process security policy
    0 outbound packets with no SA available
    0 invalid outbound packets
    0 outbound packets failed due to insufficient memory
    0 outbound packets with no route
    0 SPD cache lookups
    0 SPD cache misses
    0 inbound packets violated process security policy
    0 outbound packets violated process security policy
    0 outbound packets with no SA available
    0 outbound packets failed due to insufficient memory
    0 outbound packets with no route available
    0 invalid outbound packets
    0 outbound packets with bundled SAs
    0 mbufs coalesced during clone
    0 clusters coalesced during clone
    0 clusters copied during clone
    0 mbufs inserted during makespace
rip6:
    0 messages received
    0 checksum calculations on inbound
    0 messages with bad checksum
    0 messages dropped due to no socket
    0 multicast messages dropped due to no socket
    0 messages dropped due to full socket buffers
    0 delivered
    0 datagrams output
pfkey:
    2 requests sent from userland
    32 bytes sent from userland
    histogram by message type:
        flush: 1
        x_spdflush: 1
    0 messages with invalid length field
    0 messages with invalid version field
    0 messages with invalid message type field
    0 messages too short
    0 messages with memory allocation failure
    0 messages with duplicate extension
    0 messages with invalid extension type
    0 messages with invalid sa type
    0 messages with invalid address extension
    2 requests sent to userland
    32 bytes sent to userland
    histogram by message type:
        flush: 1
        x_spdflush: 1
    0 messages toward single socket
    0 messages toward all sockets
    0 messages toward registered sockets
    0 messages with memory allocation failure

Offline

 

#9  2014-05-19 12:25:23

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

qluk -- co ty masz za netstata, że ci inne staty pokazuje niż nam? xD

Offline

 

#10  2014-05-19 12:28:59

  jurgensen - Użytkownik

jurgensen
Użytkownik
Skąd: Wrocław
Zarejestrowany: 2010-01-26

Re: Statystyki w netstat

Taki jest w OpenBSD (na co wskazują też protokoły jak carp, czy pfsync)

Offline

 

#11  2014-05-19 15:20:38

  qluk - Pan inż. Cyc

qluk
Pan inż. Cyc
Skąd: Katowice
Zarejestrowany: 2006-05-22

Re: Statystyki w netstat

[quote=morfik]qluk — co ty masz za netstata, że ci inne staty pokazuje niż nam? xD[/quote]
Fajniejszego :P

Offline

 

#12  2014-05-19 15:25:41

  winnetou - złodziej wirków ]:->

winnetou
złodziej wirków ]:->
Skąd: Jasło/Rzeszów kiedyś Gdańs
Zarejestrowany: 2008-03-31
Serwis

Re: Statystyki w netstat

to ja też sobie wrzuce a co :P
Bez p2p, 100/100 teoretycznie ;)

Kod:

[root@hera ~ ]$ uname -a
OpenBSD hera.ga 5.4 GENERIC#37 amd64

Kod:

[root@hera ~ ]$ uptime     
 3:24PM  up 31 days, 14:40, 3 users, load averages: 0.08, 0.09, 0.08

Kod:

[root@hera ~ ]$ netstat -s 
ip:
        7819756 total packets received
        0 bad header checksums
        0 with size smaller than minimum
        0 with data size < data length
        0 with header length < data size
        0 with data length < header length
        0 with bad options
        0 with incorrect version number
        0 fragments received
        0 fragments dropped (duplicates or out of space)
        0 malformed fragments dropped
        0 fragments dropped after timeout
        0 packets reassembled ok
        7617681 packets for this host
        1236 packets for unknown/unsupported protocol
        0 packets forwarded
        137567 packets not forwardable
        0 redirects sent
        6549161 packets sent from this host
        0 packets sent with fabricated ip header
        0 output packets dropped due to no bufs, etc.
        0 output packets discarded due to no route
        0 output datagrams fragmented
        0 fragments created
        0 datagrams that can't be fragmented
        0 fragment floods
        0 packets with ip length > max ip packet size
        0 tunneling packets that can't find gif
        0 datagrams with bad address in header
        0 input datagrams checksum-processed by hardware
        0 output datagrams checksum-processed by hardware
        0 multicast packets which we don't join
icmp:
        2637 calls to icmp_error
        0 errors not generated because old message was icmp
        Output packet histogram:
                echo reply: 177
                destination unreachable: 2637
                time stamp reply: 1
        0 messages with bad code fields
        0 messages < minimum length
        4 bad checksums
        0 messages with bad length
        0 echo requests to broadcast/multicast rejected
        Input packet histogram:
                echo reply: 41
                destination unreachable: 1142
                echo: 177
                time exceeded: 52
                time stamp: 1
                time stamp reply: 1
        178 message responses generated
igmp:
        0 messages received
        0 messages received with too few bytes
        0 messages received with bad checksum
        0 membership queries received
        0 membership queries received with invalid field(s)
        0 membership reports received
        0 membership reports received with invalid field(s)
        0 membership reports received for groups to which we belong
        0 membership reports sent
ipencap:
        0 total input packets
        0 total output packets
        0 packets shorter than header shows
        0 packets dropped due to policy
        0 packets with possibly spoofed local addresses
        0 packets were dropped due to full output queue
        0 input bytes
        0 output bytes
        0 protocol family mismatches
        0 attempts to use tunnel with unspecified endpoint(s)
tcp:
        6280579 packets sent
                3861605 data packets (3225729100 bytes)
                66391 data packets (19704034 bytes) retransmitted
                3 fast retransmitted packets
                1616711 ack-only packets (2774106 delayed)
                0 URG only packets
                0 window probe packets
                485029 window update packets
                251731 control packets
                0 packets hardware-checksummed
        6601450 packets received
                3425811 acks (for 3210197281 bytes)
                322842 duplicate acks
                0 acks for unsent data
                0 acks for old data
                3545677 packets (2627709705 bytes) received in-sequence
                94496 completely duplicate packets (4860599 bytes)
                20891 old duplicate packets
                452 packets with some duplicate data (118053 bytes duplicated)
                216598 out-of-order packets (103642023 bytes)
                1 packet (1 byte) of data after window
                1 window probe
                30612 window update packets
                219 packets received after close
                63 discarded for bad checksums
                0 discarded for bad header offset fields
                0 discarded because packet too short
                0 discarded for missing IPsec protection
                0 discarded due to memory shortage
                6229863 packets hardware-checksummed
                0 bad/missing md5 checksums
                0 good md5 checksums
        24861 connection requests
        204173 connection accepts
        228844 connections established (including accepts)
        231021 connections closed (including 784 drops)
        0 connections drained
        183 embryonic connections dropped
        3210150 segments updated rtt (of 2788793 attempts)
        63207 retransmit timeouts
                128 connections dropped by rexmit timeout
        1 persist timeout
        26290 keepalive timeouts
                13242 keepalive probes sent
                46 connections dropped by keepalive
        290749 correct ACK header predictions
        2239942 correct data packet header predictions
        427887 PCB cache misses
        0 ECN connections accepted
                0 ECE packets received
                0 CWR packets received
                0 CE packets received
                0 ECT packets sent
                0 ECE packets sent
                0 CWR packets sent
                        cwr by fastrecovery: 5083
                        cwr by timeout: 63207
                        cwr by ecn: 0
        118 bad connection attempts
        205929 SYN cache entries added
                0 hash collisions
                204173 completed
                0 aborted (no space to build PCB)
                358 timed out
                0 dropped due to overflow
                0 dropped due to bucket overflow
                1398 dropped due to RST
                0 dropped due to ICMP unreachable
        3635 SYN,ACKs retransmitted
        7837 duplicate SYNs received for entries already in the cache
        0 SYNs dropped (no route or no space)
        5080 SACK recovery episodes
                10241 segment rexmits in SACK recovery episodes
                14182605 byte rexmits in SACK recovery episodes
        201283 SACK options received
        77891 SACK options sent
udp:
        1016050 datagrams received
        0 with incomplete header
        0 with bad data length field
        0 with bad checksum
        735 with no checksum
        0 input packets hardware-checksummed
        0 output packets hardware-checksummed
        2637 dropped due to no socket
        773666 broadcast/multicast datagrams dropped due to no socket
        0 dropped due to missing IPsec protection
        0 dropped due to full socket buffers
        239747 delivered
        239870 datagrams output
        10401 missed PCB cache
esp:
        0 input ESP packets
        0 output ESP packets
        0 packets from unsupported protocol families
        0 packets shorter than header shows
        0 packets dropped due to policy
        0 packets for which no TDB was found
        0 input packets that failed to be processed
        0 packets with bad encryption received
        0 packets that failed verification received
        0 packets for which no XFORM was set in TDB received
        0 packets were dropped due to full output queue
        0 packets where counter wrapping was detected
        0 possibly replayed packets received
        0 packets with bad payload size or padding received
        0 packets attempted to use an invalid TDB
        0 packets got larger than max IP packet size
        0 packets that failed crypto processing
        0 input UDP encapsulated ESP packets
        0 output UDP encapsulated ESP packets
        0 UDP packets for non-encapsulating TDB received
        0 input bytes
        0 output bytes
ah:
        0 input AH packets
        0 output AH packets
        0 packets from unsupported protocol families
        0 packets shorter than header shows
        0 packets dropped due to policy
        0 packets for which no TDB was found
        0 input packets that failed to be processed
        0 packets that failed verification received
        0 packets for which no XFORM was set in TDB received
        0 packets were dropped due to full output queue
        0 packets where counter wrapping was detected
        0 possibly replayed packets received
        0 packets with bad authenticator length received
        0 packets attempted to use an invalid TDB
        0 packets got larger than max IP packet size
        0 packets that failed crypto processing
        0 input bytes
        0 output bytes
etherip:
        0 packets shorter than header shows
        0 packets were dropped due to full output queue
        0 packets were dropped because of no interface/bridge information
        0 packets dropped due to policy
        0 packets dropped for other reasons
        0 input ethernet-in-IP packets
        0 output ethernet-in-IP packets
        0 input bytes
        0 output bytes
ipcomp:
        0 input IPCOMP packets
        0 output IPCOMP packets
        0 packets from unsupported protocol families
        0 packets shorter than header shows
        0 packets dropped due to policy
        0 packets for which no TDB was found
        0 input packets that failed to be processed
        0 packets for which no XFORM was set in TDB received
        0 packets were dropped due to full output queue
        0 packets where counter wrapping was detected
        0 packets attempted to use an invalid TDB
        0 packets got larger than max IP packet size
        0 packets that failed (de)compression processing
        0 packets less than minimum compression length
        0 input bytes
        0 output bytes
carp:
        0 packets received (IPv4)
        0 packets received (IPv6)
                0 packets discarded for bad interface
                0 packets discarded for wrong TTL
                0 packets shorter than header
                0 discarded for bad checksums
                0 discarded packets with a bad version
                0 discarded because packet too short
                0 discarded for bad authentication
                0 discarded for unknown vhid
                0 discarded because of a bad address list
        0 packets sent (IPv4)
        0 packets sent (IPv6)
                0 send failed due to mbuf memory error
        0 transitions to master
pfsync:
        0 packets received (IPv4)
        0 packets received (IPv6)
                0 packets discarded for bad interface
                0 packets discarded for bad ttl
                0 packets shorter than header
                0 packets discarded for bad version
                0 packets discarded for bad HMAC
                0 packets discarded for bad action
                0 packets discarded for short packet
                0 states discarded for bad values
                0 stale states
                0 failed state lookup/inserts
        0 packets sent (IPv4)
        0 packets sent (IPv6)
                0 send failed due to mbuf memory error
                0 send error
divert:
        0 total packets received
        0 dropped due to no socket
        0 dropped due to full socket buffers
        0 packets output
        0 errors
pflow:
        0 flows sent
        0 packets sent
                0 send failed due to mbuf memory error
                0 send error
ip6:
        42472 total packets received
        0 with size smaller than minimum
        0 with data size < data length
        0 with bad options
        0 with incorrect version number
        0 fragments received
        0 fragments dropped (duplicates or out of space)
        0 fragments dropped after timeout
        0 fragments that exceeded limit
        0 packets reassembled ok
        0 packets for this host
        0 packets forwarded
        0 packets not forwardable
        0 redirects sent
        8 packets sent from this host
        0 packets sent with fabricated ip header
        0 output packets dropped due to no bufs, etc.
        0 output packets discarded due to no route
        0 output datagrams fragmented
        0 fragments created
        0 datagrams that can't be fragmented
        0 packets that violated scope rules
        0 multicast packets which we don't join
        Input packet histogram:
                ICMP6: 42472
        Mbuf statistics:
                0 one mbufs
                42472 one ext mbufs
                0 two or more ext mbufs
        0 tunneling packets that can't find gif
        0 packets discarded due to too many headers
        0 failures of source address selection
        0 forward cache hit
        0 forward cache miss
divert6:
        0 total packets received
        0 dropped due to no socket
        0 dropped due to full socket buffers
        0 packets output
        0 errors
icmp6:
        0 calls to icmp6_error
        0 errors not generated because old message was icmp6 or so
        0 errors not generated because of rate limitation
        Output packet histogram:
                multicast listener report: 8
        0 messages with bad code fields
        0 messages < minimum length
        0 bad checksums
        0 messages with bad length
        Input packet histogram:
                neighbor advertisement: 41365
        Histogram of error messages to be generated:
                0 no route
                0 administratively prohibited
                0 beyond scope
                0 address unreachable
                0 port unreachable
                0 packet too big
                0 time exceed transit
                0 time exceed reassembly
                0 erroneous header field
                0 unrecognized next header
                0 unrecognized option
                0 redirect
                0 unknown
        0 message responses generated
        0 messages with too many ND options
        0 messages with bad ND options
        0 bad neighbor solicitation messages
        4 bad neighbor advertisement messages
        0 bad router solicitation messages
        0 bad router advertisement messages
        0 bad redirect messages
        0 path MTU changes
pim6:
        0 messages received
        0 messages received with too few bytes
        0 messages received with bad checksum
        0 messages received with bad version
        0 registers received
        0 bad registers received
        0 registers sent
rip6:
        0 messages received
        0 checksum calculations on inbound
        0 messages with bad checksum
        0 messages dropped due to no socket
        0 multicast messages dropped due to no socket
        0 messages dropped due to full socket buffers
        0 delivered
        0 datagrams output
[root@hera ~ ]$

LRU: #472938
[b]napisz do mnie:[/b] ola@mojmail.eu
[url=http://valhalla.org.pl]Hołmpejdż[/url] | [url=http://valhalla.org.pl/foto]Galerie[/url] | [url=http://valhalla.org.pl/tech]"Twórczość"[/url] || [url=http://img.munn.in]Free Image Hosting[/url]

Offline

 

#13  2014-05-19 16:16:55

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

Sam log netstata mi niewiele powie odnośnie dostosowania tych kernelowskich parametrów.

Za 1,5h wrzucę swój log z odpalonym p2p z 12h, się pośmiejemy. xD

Offline

 

#14  2014-05-19 17:07:06

  winnetou - złodziej wirków ]:->

winnetou
złodziej wirków ]:->
Skąd: Jasło/Rzeszów kiedyś Gdańs
Zarejestrowany: 2008-03-31
Serwis

Re: Statystyki w netstat

Stacjonarka (bez p2p)

Kod:

[winnetou@localhost ~]$ uname -a && uptime
Linux localhost 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014 x86_64 GNU/Linux
 16:57:14 up 39 days, 25 min, 10 users,  load average: 1,25, 1,30, 1,10

Kod:

[winnetou@localhost ~]$ netstat -s 
Ip:
    72490738 total packets received
    0 forwarded
    0 incoming packets discarded
    72096308 incoming packets delivered
    69915493 requests sent out
Icmp:
    925281 ICMP messages received
    433562 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 920145
        timeout in transit: 967
        source quenches: 12
        echo replies: 4157
    934500 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 787627
        echo request: 146873
IcmpMsg:
        InType0: 4157
        InType3: 920145
        InType4: 12
        InType11: 967
        OutType3: 787627
        OutType8: 146873
Tcp:
    2166735 active connections openings
    82 passive connection openings
    352094 failed connection attempts
    27778 connection resets received
    78 connections established
    70951237 segments received
    68771003 segments send out
    1846905 segments retransmited
    6689 bad segments received.
    79729 resets sent
Udp:
    140991 packets received
    1334 packets to unknown port received.
    0 packet receive errors
    238490 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    10 packets pruned from receive queue because of socket buffer overrun
    114 ICMP packets dropped because they were out-of-window
    980618 TCP sockets finished time wait in fast timer
    8527 packets rejects in established connections because of timestamp
    1624730 delayed acks sent
    515 delayed acks further delayed because of locked socket
    Quick ack mode was activated 171577 times
    44962 packets directly queued to recvmsg prequeue.
    1428 bytes directly in process context from backlog
    45742567 bytes directly received in process context from prequeue
    31753263 packet headers predicted
    30240 packets header predicted and directly queued to user
    7999231 acknowledgments not containing data payload received
    17654019 predicted acknowledgments
    2 times recovered from packet loss due to fast retransmit
    11965 times recovered from packet loss by selective acknowledgements
    33 bad SACK blocks received
    Detected reordering 11 times using FACK
    Detected reordering 440 times using SACK
    Detected reordering 1 times using reno fast retransmit
    Detected reordering 268 times using time stamp
    71 congestion windows fully recovered without slow start
    344 congestion windows partially recovered using Hoe heuristic
    1771 congestion windows recovered without slow start by DSACK
    16110 congestion windows recovered without slow start after partial ack
    TCPLostRetransmit: 153
    2 timeouts after reno fast retransmit
    2256 timeouts after SACK recovery
    157 timeouts in loss state
    17086 fast retransmits
    1819 forward retransmits
    1269 retransmits in slow start
    903610 other TCP timeouts
    TCPLossProbes: 197617
    TCPLossProbeRecovery: 82860
    1555 SACK retransmits failed
    3 times receiver scheduled too late for direct processing
    1611 packets collapsed in receive queue due to low socket buffer
    176084 DSACKs sent for old packets
    1184 DSACKs sent for out of order packets
    131538 DSACKs received
    49 DSACKs for out of order packets received
    11837 connections reset due to unexpected data
    20968 connections reset due to early user close
    3214 connections aborted due to timeout
    TCPSACKDiscard: 8
    TCPDSACKIgnoredOld: 90
    TCPDSACKIgnoredNoUndo: 47884
    TCPSpuriousRTOs: 1465
    TCPSackShifted: 119
    TCPSackMerged: 59161
    TCPSackShiftFallback: 102207
    TCPRetransFail: 3221
    TCPRcvCoalesce: 3986862
    TCPOFOQueue: 1992704
    TCPOFOMerge: 1201
    TCPChallengeACK: 7148
    TCPSYNChallenge: 6698
    TCPSpuriousRtxHostQueues: 200822
IpExt:
    InTruncatedPkts: 8
    OutMcastPkts: 29
    InBcastPkts: 77435
    InOctets: 44003287879
    OutOctets: 13535788671
    OutMcastOctets: 4671
    InBcastOctets: 11413468
    InNoECTPkts: 72606157
    InECT1Pkts: 559
    InECT0Pkts: 1870
    InCEPkts: 11692

Virtualna, lokalna maszyna (też bez p2p)

Kod:

valhalla ~ # uname -a && uptime 
Linux valhalla.org.pl 3.12.13-gentoo #1 SMP Sat Apr 26 19:35:08 CEST 2014 x86_64 Intel(R) Xeon(R) CPU L5520 @ 2.27GHz GenuineIntel GNU/Linux
 16:58:19 up 22 days, 21:05,  3 users,  load average: 0,00, 0,01, 0,05

Kod:

valhalla ~ # netstat -s
Ip:
    73428 total packets received
    0 forwarded
    0 incoming packets discarded
    73356 incoming packets delivered
    18495 requests sent out
Icmp:
    8 ICMP messages received
    0 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 8
    0 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
IcmpMsg:
        InType3: 8
Tcp:
    34 active connections openings
    15 passive connection openings
    0 failed connection attempts
    2 connection resets received
    2 connections established
    26992 segments received
    18213 segments send out
    0 segments retransmited
    0 bad segments received.
    4 resets sent
Udp:
    73 packets received
    0 packets to unknown port received.
    0 packet receive errors
    292 packets sent
    0 receive buffer errors
    0 send buffer errors
UdpLite:
TcpExt:
    3 packets pruned from receive queue because of socket buffer overrun
    29 TCP sockets finished time wait in fast timer
    314 delayed acks sent
    Quick ack mode was activated 32 times
    5066 bytes directly in process context from backlog
    14132 packet headers predicted
    4 packets header predicted and directly queued to user
    744 acknowledgments not containing data payload received
    7897 predicted acknowledgments
    TCPLossProbes: 1
    27 packets collapsed in receive queue due to low socket buffer
    32 DSACKs sent for old packets
    1 DSACKs received
    3 connections reset due to unexpected data
    TCPRcvCoalesce: 1220
    TCPOFOQueue: 1282
    TCPSpuriousRtxHostQueues: 1
IpExt:
    InNoRoutes: 2
    InBcastPkts: 46283
    InOctets: 28615977
    OutOctets: 1836689
    InBcastOctets: 6495920
    InNoECTPkts: 73440

Stacjonarka natowana, CPU

Kod:

[winnetou@localhost ~]$ egrep "model name|processor" /proc/cpuinfo 
processor    : 0
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 1
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 2
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 3
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 4
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 5
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 6
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz
processor    : 7
model name    : Intel(R) Xeon(R) CPU           L5520  @ 2.27GHz

RAM

Kod:

[winnetou@localhost ~]$ free -tom
             total       used       free     shared    buffers     cached
Mem:         12083      11819        264        382        166       4304
Swap:            0          0          0
Total:       12083      11819        264

LRU: #472938
[b]napisz do mnie:[/b] ola@mojmail.eu
[url=http://valhalla.org.pl]Hołmpejdż[/url] | [url=http://valhalla.org.pl/foto]Galerie[/url] | [url=http://valhalla.org.pl/tech]"Twórczość"[/url] || [url=http://img.munn.in]Free Image Hosting[/url]

Offline

 

#15  2014-05-19 18:20:04

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

winnetou -- bez p2p masz: 2,166,735 połączeń z czego nieudanych 352,094? xD

Mi prąd wyłączyli i moje 12h statystyki szlag trafił. W każdym razie z tego co tam patrzyłem na te 2h przed, to miałem tam około 1mln połączeń, z czego 800-900tyś nieudanych. xD

Tak sobie wrzuciłem na watch tego netstata i widzę, że te nieudane połączenia wskakują w tempie jakimś 5/s W każdym razie zrobiłem krótki zrzut (p2p):

Kod:

$ netstat -s
Ip:
    87537 total packets received
    0 forwarded
    0 incoming packets discarded
    85495 incoming packets delivered
    113075 requests sent out
    208 outgoing packets dropped
    1 dropped because of missing route
    2 fragments received ok
    4 fragments created
Icmp:
    3062 ICMP messages received
    492 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 3017
        timeout in transit: 44
        echo replies: 1
    99 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 98
        echo request: 1
IcmpMsg:
        InType0: 1
        InType3: 3017
        InType11: 44
        OutType3: 98
        OutType8: 1
Tcp:
    7880 active connections openings
    180 passive connection openings
    3243 failed connection attempts
    261 connection resets received
    19 connections established
    27800 segments received
    35624 segments send out
    7871 segments retransmited
    52 bad segments received.
    584 resets sent
Udp:
    54583 packets received
    31 packets to unknown port received.
    0 packet receive errors
    72947 packets sent
UdpLite:
TcpExt:
    560 TCP sockets finished time wait in fast timer
    441 delayed acks sent
    2 delayed acks further delayed because of locked socket
    Quick ack mode was activated 177 times
    68 packets directly queued to recvmsg prequeue.
    1460 bytes directly in process context from backlog
    13878 bytes directly received in process context from prequeue
    8318 packet headers predicted
    23 packets header predicted and directly queued to user
    6382 acknowledgments not containing data payload received
    3706 predicted acknowledgments
    330 times recovered from packet loss by selective acknowledgements
    Detected reordering 1 times using FACK
    4 congestion windows recovered without slow start by DSACK
    82 congestion windows recovered without slow start after partial ack
    TCPLostRetransmit: 16
    27 timeouts after SACK recovery
    9 timeouts in loss state
    455 fast retransmits
    4 forward retransmits
    34 retransmits in slow start
    3444 other TCP timeouts
    TCPLossProbes: 189
    TCPLossProbeRecovery: 46
    25 SACK retransmits failed
    145 DSACKs sent for old packets
    75 DSACKs received
    30 connections reset due to unexpected data
    159 connections reset due to early user close
    23 connections aborted due to timeout
    TCPDSACKIgnoredNoUndo: 45
    TCPSpuriousRTOs: 34
    TCPSackShifted: 2
    TCPSackMerged: 659
    TCPSackShiftFallback: 1255
    TCPRetransFail: 428
    TCPRcvCoalesce: 1794
    TCPOFOQueue: 108
    TCPChallengeACK: 66
    TCPSYNChallenge: 61
IpExt:
    InMcastPkts: 1325
    OutMcastPkts: 1862
    InBcastPkts: 503
    OutBcastPkts: 81
    InOctets: 17277718
    OutOctets: 70277587
    InMcastOctets: 216405
    OutMcastOctets: 303255
    InBcastOctets: 144169
    OutBcastOctets: 13365
    InNoECTPkts: 87343
    InECT0Pkts: 58
    InCEPkts: 136

A tu dla porównania (również krótki log) bez p2p:

Kod:

morfik:~$ netstat -s
Ip:
    71941 total packets received
    0 forwarded
    0 incoming packets discarded
    71694 incoming packets delivered
    41379 requests sent out
    1 dropped because of missing route
Icmp:
    15 ICMP messages received
    0 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 14
        echo replies: 1
    55 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 54
        echo request: 1
IcmpMsg:
        InType0: 1
        InType3: 14
        OutType3: 54
        OutType8: 1
Tcp:
    510 active connections openings
    72 passive connection openings
    0 failed connection attempts
    5 connection resets received
    12 connections established
    69265 segments received
    38786 segments send out
    95 segments retransmited
    23 bad segments received.
    203 resets sent
Udp:
    2413 packets received
    1 packets to unknown port received.
    0 packet receive errors
    2415 packets sent
UdpLite:
TcpExt:
    205 TCP sockets finished time wait in fast timer
    251 delayed acks sent
    1 delayed acks further delayed because of locked socket
    Quick ack mode was activated 154 times
    44 packets directly queued to recvmsg prequeue.
    1495 bytes directly in process context from backlog
    15663 bytes directly received in process context from prequeue
    58145 packet headers predicted
    20 packets header predicted and directly queued to user
    1227 acknowledgments not containing data payload received
    577 predicted acknowledgments
    3 times recovered from packet loss by selective acknowledgements
    4 congestion windows recovered without slow start by DSACK
    4 congestion windows recovered without slow start after partial ack
    1 timeouts in loss state
    3 fast retransmits
    45 other TCP timeouts
    TCPLossProbes: 77
    TCPLossProbeRecovery: 50
    115 DSACKs sent for old packets
    89 DSACKs received
    10 connections reset due to unexpected data
    3 connections reset due to early user close
    2 connections aborted due to timeout
    TCPDSACKIgnoredNoUndo: 39
    TCPSackShiftFallback: 15
    TCPRetransFail: 3
    TCPRcvCoalesce: 15711
    TCPOFOQueue: 4249
    TCPChallengeACK: 23
    TCPSYNChallenge: 23
IpExt:
    InBcastPkts: 191
    InOctets: 97616878
    OutOctets: 2931945
    InBcastOctets: 59210
    InNoECTPkts: 71941

Jak widać liczba prób połączeń oraz retransmisji pakietów drastycznie zmalała.

Może to NAT przy torrencie tak niszczy te połączenia? Może to wina ipseta i czarnych list?

Ostatnio edytowany przez morfik (2014-05-19 18:21:21)

Offline

 

#16  2014-05-19 18:23:22

  winnetou - złodziej wirków ]:->

winnetou
złodziej wirków ]:->
Skąd: Jasło/Rzeszów kiedyś Gdańs
Zarejestrowany: 2008-03-31
Serwis

Re: Statystyki w netstat

Morfik - na 35di uptimu to i tak nie dużo tym bardziej, że "sporo zwiedzam" i kompa też do roboty wkorzystuje.
to daje jakieś 60tyś połączeń na dobę więc nie jest tak źle ;)


LRU: #472938
[b]napisz do mnie:[/b] ola@mojmail.eu
[url=http://valhalla.org.pl]Hołmpejdż[/url] | [url=http://valhalla.org.pl/foto]Galerie[/url] | [url=http://valhalla.org.pl/tech]"Twórczość"[/url] || [url=http://img.munn.in]Free Image Hosting[/url]

Offline

 

#17  2014-05-19 19:09:19

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

Tak ale przy przeglądaniu stron www nie powinno być nieudanych prób praktycznie wcale albo jakaś mała liczba, a u ciebie jest ponad 16%, to strasznie dużo. xD

Offline

 

#18  2014-05-19 20:18:50

  mati75 - Psuj

mati75
Psuj
Skąd: default city
Zarejestrowany: 2010-03-14
Serwis

Re: Statystyki w netstat

AP jako wyjdzie na zewnątrz.

Kod:

20:17:08 up 14 days, 22:45,  1 user,  load average: 0,08, 0,03, 0,05

Kod:

net.core.rmem_default = 163840
net.core.rmem_max = 163840
net.core.wmem_default = 163840
net.core.wmem_max = 163840
net.ipv4.tcp_mem = 10383        13847   20766
net.ipv4.tcp_rmem = 4096        87380   3545024
net.ipv4.tcp_wmem = 4096        16384   3545024
net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_wmem_min = 4096
vm.lowmem_reserve_ratio = 32

Kod:

Ip:
    17343982 total packets received
    0 forwarded
    0 incoming packets discarded
    17321004 incoming packets delivered
    15893455 requests sent out
Icmp:
    1727 ICMP messages received
    1550 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 1672
        echo requests: 53
        echo replies: 2
    191 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 189
        echo request: 2
IcmpMsg:
        InType0: 2
        InType3: 1672
        InType8: 53
        OutType3: 189
        OutType8: 2
Tcp:
    23000 active connections openings
    513 passive connection openings
    2466 failed connection attempts
    530 connection resets received
    3 connections established
    17225920 segments received
    15781570 segments send out
    54092 segments retransmited
    219 bad segments received.
    967 resets sent
Udp:
    2862238 packets received
    12 packets to unknown port received.
    14558 packet receive errors
    1338849 packets sent
UdpLite:
TcpExt:
    54 invalid SYN cookies received
    179 resets received for embryonic SYN_RECV sockets
    5479 TCP sockets finished time wait in fast timer
    1264 packets rejects in established connections because of timestamp
    181019 delayed acks sent
    2379 delayed acks further delayed because of locked socket
    Quick ack mode was activated 14619 times
    4 SYNs to LISTEN sockets dropped
    1915 packets directly queued to recvmsg prequeue.
    10151273 bytes directly in process context from backlog
    15952934 bytes directly received in process context from prequeue
    11106982 packet headers predicted
    18028 packets header predicted and directly queued to user
    338546 acknowledgments not containing data payload received
    4185168 predicted acknowledgments
    1215 times recovered from packet loss by selective acknowledgements
    1 bad SACK blocks received
    Detected reordering 1 times using time stamp
    1 congestion windows partially recovered using Hoe heuristic
    56 congestion windows recovered without slow start by DSACK
    1550 congestion windows recovered without slow start after partial ack
    TCPLostRetransmit: 47
    233 timeouts after SACK recovery
    157 timeouts in loss state
    1489 fast retransmits
    260 forward retransmits
    858 retransmits in slow start
    17121 other TCP timeouts
    TCPLossProbes: 8436
    TCPLossProbeRecovery: 3380
    416 SACK retransmits failed
    18009 DSACKs sent for old packets
    219 DSACKs sent for out of order packets
    2774 DSACKs received
    6 DSACKs for out of order packets received
    403 connections reset due to unexpected data
    136 connections reset due to early user close
    1601 connections aborted due to timeout
    TCPDSACKIgnoredOld: 1
    TCPDSACKIgnoredNoUndo: 1545
    TCPSpuriousRTOs: 501
    TCPSackShiftFallback: 9969
    TCPRetransFail: 3
    TCPRcvCoalesce: 4125874
    TCPOFOQueue: 614179
    TCPOFOMerge: 122
    TCPChallengeACK: 280
    TCPSYNChallenge: 224
    TCPSpuriousRtxHostQueues: 37
IpExt:
    InMcastPkts: 2133
    OutMcastPkts: 187
    InBcastPkts: 40813
    InOctets: -1
    OutOctets: -1
    InMcastOctets: 414147
    OutMcastOctets: 142910
    InBcastOctets: 4783158
    InNoECTPkts: 17343281
    InECT0Pkts: 3
    InCEPkts: 699

[img]https://l0calh0st.pl/obrazki/userbar.png[/img]

Offline

 

#19  2014-05-19 23:01:48

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

Wychodzi na to, że taka ilość retransmisji i błędnych połączeń to norma w p2p, taką odpowiedź dostałem z forum qb:

Peers drop connections all the time, if they have broadcast a piece request and a peer other than your client fufills that request, connections that were made as 'optimistic' can be dropped.[/quote]

Offline

 

#20  2014-05-19 23:49:17

  lewyx84 - Użytkownik

lewyx84
Użytkownik
Zarejestrowany: 2013-10-29

Re: Statystyki w netstat

Uptime - 35 dni, 24 GB RAM, łącze -> 1 Gbps/1 Gbps

Kod:

netstat -s

Kod:

Ip:
    844120884 total packets received
    4 with invalid headers
    583 with invalid addresses
    332360574 forwarded
    0 incoming packets discarded
    510790126 incoming packets delivered
    656890111 requests sent out
    3102461 outgoing packets dropped
    2890 fragments dropped after timeout
    51688182 reassemblies required
    21385808 packets reassembled ok
    6211 packet reassembles failed
    92026111 fragments received ok
    242126359 fragments created
Icmp:
    6019383 ICMP messages received
    5948 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 6011863
        timeout in transit: 6121
        source quenches: 3
        redirects: 371
        echo requests: 926
        echo replies: 14
        timestamp request: 2
    4519482 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 1339654
        time exceeded: 4
        redirect: 3178877
        echo request: 19
        echo replies: 926
        timestamp replies: 2
IcmpMsg:
        InType0: 14
        InType3: 6011863
        InType4: 3
        InType5: 371
        InType8: 926
        InType11: 6121
        InType13: 2
        OutType0: 926
        OutType3: 1339654
        OutType5: 3178877
        OutType8: 19
        OutType11: 4
        OutType14: 2
Tcp:
    296149 active connections openings
    1985776 passive connection openings
    6629 failed connection attempts
    15695 connection resets received
    17 connections established
    78741253 segments received
    79298835 segments send out
    415912 segments retransmited
    8595 bad segments received.
    746945 resets sent
Udp:
    425208109 packets received
    1386052 packets to unknown port received.
    956077 packet receive errors
    245229813 packets sent
    SndbufErrors: 93
UdpLite:
TcpExt:
    2 SYN cookies sent
    12095 invalid SYN cookies received
    6613 resets received for embryonic SYN_RECV sockets
    62 packets pruned from receive queue because of socket buffer overrun
    1384373 TCP sockets finished time wait in fast timer
    1841 packets rejects in established connections because of timestamp
    513886 delayed acks sent
    2421 delayed acks further delayed because of locked socket
    Quick ack mode was activated 29706 times
    2538415 packets directly queued to recvmsg prequeue.
    217341973 bytes directly in process context from backlog
    852713074 bytes directly received in process context from prequeue
    52716791 packet headers predicted
    1256036 packets header predicted and directly queued to user
    7233761 acknowledgments not containing data payload received
    6749857 predicted acknowledgments
    27 times recovered from packet loss due to fast retransmit
    23914 times recovered from packet loss by selective acknowledgements
    12 bad SACK blocks received
    Detected reordering 81 times using FACK
    Detected reordering 688 times using SACK
    Detected reordering 1 times using reno fast retransmit
    Detected reordering 461 times using time stamp
    841 congestion windows fully recovered without slow start
    4418 congestion windows partially recovered using Hoe heuristic
    18681 congestion windows recovered without slow start by DSACK
    9874 congestion windows recovered without slow start after partial ack
    39275 TCP data loss events
    TCPLostRetransmit: 1474
    20 timeouts after reno fast retransmit
    2613 timeouts after SACK recovery
    882 timeouts in loss state
    45187 fast retransmits
    17604 forward retransmits
    11989 retransmits in slow start
    321468 other TCP timeouts
    3 classic Reno fast retransmits failed
    1000 SACK retransmits failed
    7331 packets collapsed in receive queue due to low socket buffer
    40243 DSACKs sent for old packets
    12 DSACKs sent for out of order packets
    154327 DSACKs received
    63 DSACKs for out of order packets received
    8350 connections reset due to unexpected data
    170 connections reset due to early user close
    3197 connections aborted due to timeout
    TCPSACKDiscard: 3
    TCPDSACKIgnoredOld: 349
    TCPDSACKIgnoredNoUndo: 11022
    TCPSpuriousRTOs: 307
    TCPSackShiftFallback: 484741
    TCPDeferAcceptDrop: 1866701
    TCPReqQFullDoCookies: 2
    TCPChallengeACK: 593
    TCPSYNChallenge: 22
IpExt:
    InMcastPkts: 22262
    InBcastPkts: 40911
    InOctets: 1816944879
    OutOctets: 908093156
    InMcastOctets: 712384
    InBcastOctets: 4386559

Kod:

sysctl -a | egrep -i "rmem|wmem|tcp_mem"

Kod:

vm.lowmem_reserve_ratio = 256   256     32
net.core.wmem_max = 131071
net.core.rmem_max = 131071
net.core.wmem_default = 229376
net.core.rmem_default = 229376
net.ipv4.tcp_mem = 581208       774945  1162416
net.ipv4.tcp_wmem = 4096        16384   4194304
net.ipv4.tcp_rmem = 4096        87380   6291456
net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_wmem_min = 4096

Offline

 

#21  2014-05-20 07:00:30

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

lewyx84 -- jak na 1 gbit to masz trochę dziwne ustawienia buforów i pamięci.  Z tego co sobie liczę, to przy 1gbit bufor powinien być gdzieś na poziomie 5,242,880 bajtów -- tyle minimum musi być przypisane do połączenia, by mogło ono przesyłać dane z prędkością 1gbit/s, przynajmniej przy opóźnieniach rzędu 20ms -- a tam masz 4,194,304 i 6,291,456 bajtów. Jeśli opóźnienie wzrośnie (nie wiem jakie tam masz) ale spokojnie można założyć 2-3 krotnie większe, to ten bufor powinien być 3x 5,242,880bajtów, czyli koło 16M aby obsłużyć ten 1gbit. A ty tam masz 4 i 6 dla pobierania i wysyłania, także nawet przy 20ms ten net ci nie pobierze danych z prędkością 1gbit/s. xD

Te wartości środkowe też się wydają nieco zbyt małe jak 24GiB ramu, no chyba że masz tam dziesiątki tyś połączeń, wtedy alokowanie nawet tych parudziesięciu kb na połączenie może przytłoczyć.

No i przy pamięci 24GiB, to 1,162,416 bajtów na połączenia przy 1gbit łączu, biorąc pod uwagę że 1 połączenie, by osiągnąć pełną przepustowość wymaga 5-16x tyle, wydaje się trochę śmieszne. xD

lewyx84 ten net ci osiąga ten 1gbit w obie strony? Chyba, że może ja coś tu źle liczę? Jak coś to poprawcie mnie. xD

Ostatnio edytowany przez morfik (2014-05-20 07:04:30)

Offline

 

#22  2014-05-20 09:25:36

  darius - Użytkownik

darius
Użytkownik
Skąd: Paryz/Wilanow
Zarejestrowany: 2014-03-21

Re: Statystyki w netstat

[quote=morfik]lewyx84 ten net ci osiąga ten 1gbit w obie strony?[/quote]
Nie mozesz osiagnac tych predkosci w praktyce. Nawet jak masz potezny sprzet, procesor i twardy dysk (min SSD) ktory zdazy zapisywac dane wysylane z wysoka predkoscia. RAM 24 GB jest "rozpusta" w tym wypadku.

Zalezy tez w czym liczysz. ATM czy IP.
* przeplyw ATM jest to calkowity przeplyw potrzebny do przekazu danych.
* przeplyw IP jest to przeplyw do transmisji potrzebnych danych. 
50 Méga w ATM odjac ~ 20% = 40 Méga w IP.

Moze z tym sie lepiej zrozumiemy => http://iperf.fr/


Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

Offline

 

#23  2014-05-20 10:34:48

  qluk - Pan inż. Cyc

qluk
Pan inż. Cyc
Skąd: Katowice
Zarejestrowany: 2006-05-22

Re: Statystyki w netstat

[quote=darius]Nie mozesz osiagnac tych predkosci w praktyce. Nawet jak masz potezny sprzet, procesor i twardy dysk (min SSD) ktory zdazy zapisywac dane wysylane z wysoka predkoscia. RAM 24 GB jest "rozpusta" w tym wypadku.[/quote]
Nie tylko SSD, wystarczy niewielka macierz żeby wysycić łącze eth 1Gbps, ja crosslinki 2Gbps bez problemu wysycam. Tym bardziej, że 125MB/s da się na wielu HDD osiągnąć przy liniowych operacjach.

Ostatnio edytowany przez qluk (2014-05-20 10:38:02)

Offline

 

#24  2014-05-20 10:42:24

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Statystyki w netstat

Ja tam zawsze wychodzę z założenia, że ramu nigdy za dużo, nawet jak masz te 24GiB to nic z tego się chyba i tak nie zmarnuje, najwyżej cache to wypełni.

A co do liczenia. To na necie sobie znalazłem info, że istnieje coś takiego jak TCP window, które odpowiada za przesłanie jakieś tam porcji danych bez potrzeby potwierdzania ich pakietami ACK. Im większe jest takie okno tym więcej można przepchnąć danych przez łącze, zakładając, że opóźnienie jest takie samo. Im większe są opóźnienia tym większy bufor jest potrzebny, bo więcej danych jest w drodze z punktu A do B. Jeśli są małe bufory maleje też wielkość okna i co za tym idzie prędkość przesyłu, bo maszyna przetwarza max tyle danych ile jest w buforze, a jeśli ten się wypełni, to automatycznie są zmniejszane okienka by spowolnić przesył pakietów i tym samym zasygnalizować drugiej stronie by przestała słać więcej danych, przynajmniej do czasu rozładowania bufora.

Zakładając, że dysponujemy łączem 40/40mbit oraz RTT w granicach 20ms, to możemy obliczyć bufor w taki sposób:

40 Mbps to 5,242,880 bajtów/s (40/8*1024*1024)
20ms to 0.02s

5242880*0.02=104858bajtów

To by było akceptowalne gdyby dane szły tylko w jedną stronę, ale przecie trzeba czekać na potwierdzenie ACK po wysłaniu jakiejś tam porcji danych w oknie. Jako, że dane idą w obie strony z mniej więcej takim samym opóżnieniem, to się dubluje te powyższą wartość i otrzymuje bufor dla połączenia o prędkości 40mbit/s o rozmiarze nieco ponad 200k bajtów. W innym wypadku, nie da rady osiągnąć tej prędkości, musiało by ewentualnie zostać zmniejszone RTT, na co lepiej nie liczyć w dzisiejszych czasach. xD Im wyższe są opóźnienia, tym większy bufor trzeba, by zachować transfer na stałym, granicznym dla łącza poziomie.

Ja oszacowałem sobie max RTT na wartość 3*standardowe RTT, czyli było by około 600k bajtów na bufor dla tego połączenia -- to jest ta 3 wartość w tcp_wmem i tcp_rmem . Tyle, że to jest na sztywno ustawiane dla każdego gniazda TCP, czyli jakbyśmy mieli 100 połączeń to każde z nich dostanie przydział ramu w wysokości 600k ale tylko w przypadku gdyby ta wartość była tam ustawiona na każdej z tych 3 pozycji. Na szczęście po to są te 3 wartości tam by bufor się mógł skalować w oparciu o dostępną ilość pamięci ram dla wszystkich połączeń, którą określa tcp_mem. I tam też są 3 wartości z których pierwsza to minimum ram pod wszystkie połączenia. Po osiągnięciu zaś drugiej wartości, pamięć ma być powoli odchudzana, czyli bufory mają być zmniejszane. Ostatnia wartość z kolei to max ile mogą połączenia zutylizować ramu i to jest graniczna wartość, której nie można przekroczyć. Czyli jak mamy do czynienia z jednym połączeniem, to po zajęciu 600k w pamięci osiągnie ono full przepustowości łącza. W przypadku gdy tych połączeń było by dużo, to bufory zostaną im zmniejszone i tym samym zostanie ograniczony transfer per connection.

Takie jest moje rozumienie tego mechanizmu. xD

Ostatnio edytowany przez morfik (2014-05-20 10:45:00)

Offline

 

#25  2014-05-20 14:49:03

  darius - Użytkownik

darius
Użytkownik
Skąd: Paryz/Wilanow
Zarejestrowany: 2014-03-21

Re: Statystyki w netstat

[quote=qluk]Nie tylko SSD, wystarczy niewielka macierz żeby wysycić łącze eth 1Gbps, ja crosslinki 2Gbps bez problemu wysycam. Tym bardziej, że 125MB/s da się na wielu HDD osiągnąć przy liniowych operacjach.[/quote]
Panowie, mam nadzieje, ze mowimy o tym samym i nie ma pomylki 1Gbit/s = 1000 Mbit/s ? [url=http://test-debit.free.fr/]Tutaj[/url] testuje na moim starym sprzecie szybkosc przeplywu (bez obciazen) i [b]image.iso 647 M[/b] ciagne w 12 sekund a [b]1048576.rnd 1.0G[/b] w 16 sekund. czyli wedlug Was co osiagam ? Komputer stacjonarny z 2006 roku.

Ostatnio edytowany przez darius (2014-05-20 14:50:17)


Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)

[ Generated in 0.011 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00009 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00096 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.117.141.69' WHERE u.id=1
0.00079 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.117.141.69', 1732833126)
0.00043 SELECT * FROM punbb_online WHERE logged<1732832826
0.00042 SELECT topic_id FROM punbb_posts WHERE id=267580
0.00006 SELECT id FROM punbb_posts WHERE topic_id=25843 ORDER BY posted
0.00048 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=25843 AND t.moved_to IS NULL
0.00005 SELECT search_for, replace_with FROM punbb_censoring
0.00268 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=25843 ORDER BY p.id LIMIT 0,25
0.00088 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=25843
Total query time: 0.00688 s