LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-10-2010, 08:47 PM   #1
ohcarol
Member
 
Registered: Dec 2004
Location: Nepal
Posts: 86

Rep: Reputation: 15
too much packet loss while running mrtg to graph traffic


Hello all,

I am running Redhat linux 8.0 with 2.4.22 kernel. I am using this server for traffic shaping my static ip clients using tc. There are about 250 clients and I am running mrtg to monitor traffic via cronjobs each 5 minutes. When mrtg run I see too much packets loss in my network. What could be the problem in my server?
RAM is 1gb and processor is Intel Pentium D 2.66GHz.


Thank you
 
Old 05-11-2010, 12:28 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
First off, Red Hat 8 is ancient and unsupported . You should really update to something more modern, particularly for mission critical work,

There are a couple reasons why packet loss could occur on your network. Two likely ones are:

1. Bad hardware somewhere is causing packets to become corrupt and get discarded.
2. Your machine is getting overwhelmend and is running out of resources such as buffer space to store packets and thus is dropping them,

How do you know that excessive numbers of packets are being dropped (i.e. what tool do you use to see this)? Have you looked to see if you're low on memory on the machine or us excessive amounts of memory required for packet cache? Have you checked that your hardware is good? How active are your clients. Your machine should be fast enough to handle the packet shaping, but if these clients are all slamming a 1 Gbps network I could see how things would get to become overwhelmed. This may also depend on how much processing work the machine must do to apply the shaping rules. Is your ruleset simple or complex?

In short, lots of things could be happening. You'll need to do a little digging (and please consider upgrading your box to a modern and supported Linux distribution).
 
Old 05-11-2010, 02:31 AM   #3
ohcarol
Member
 
Registered: Dec 2004
Location: Nepal
Posts: 86

Original Poster
Rep: Reputation: 15
Hi btmiller,

Thanks for the quick reply.

1.How do you know that excessive numbers of packets are being dropped (i.e. what tool do you use to see this
I am pinging to my gateway server ip from lan. If I disable mrtg from cron jobs then the link seems to be ok. There won't be any losses. The memory seems to be fine. Output of free -m:
[root@gw-wl-sp cfg]# free -m
total used free shared buffers cached
Mem: 882 257 625 0 74 80
-/+ buffers/cache: 102 780
Swap: 2047 0 2047
=============================================
Output of top when idle
1:08pm up 16:18, 2 users, load average: 0.00, 0.02, 0.07
43 processes: 42 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 0.0% user, 4.4% system, 0.0% nice, 95.1% idle
CPU1 states: 0.1% user, 0.1% system, 0.0% nice, 99.3% idle
Mem: 904016K av, 263432K used, 640584K free, 0K shrd, 76300K buff
Swap: 2096440K av, 0K used, 2096440K free 82396K cached
=======================================
Output of top when run mrtg

1:10pm up 16:20, 2 users, load average: 0.09, 0.03, 0.07
47 processes: 46 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 11.1% user, 62.4% system, 0.0% nice, 26.0% idle
CPU1 states: 37.2% user, 17.1% system, 0.0% nice, 45.2% idle
Mem: 904016K av, 270592K used, 633424K free, 0K shrd, 76936K buff
Swap: 2096440K av, 0K used, 2096440K free 82416K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
2148 root 9 0 5052 5052 4948 S 32.9 0.5 0:08 httpd
128 root 9 0 0 0 0 SW 23.1 0.0 3:05 kjournald
129 root 9 0 0 0 0 SW 12.7 0.0 2:39 kjournald
8128 root 18 0 7464 7464 1628 S 4.9 0.8 0:00 mrtg
536 ntp 9 0 2348 2348 2096 S 0.1 0.2 0:09 ntpd
6311 root 9 0 1012 1012 772 S 0.1 0.1 0:00 top
1 root 8 0 476 476 424 S 0.0 0.0 0:04 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 6:26 ksoftirqd_CPU0
4 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU1
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 9 0 0 0 0 SW 0.0 0.0 0:41 kupdated
8 root 9 0 0 0 0 SW 0.0 0.0 2:17 kjournald
59 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
127 root 9 0 0 0 0 SW 0.0 0.0 0:01 kjournald
315 root 9 0 0 0 0 SW 0.0 0.0 0:00 eth0
483 root 9 0 544 544 460 S 0.0 0.0 0:00 syslogd
487 root 9 0 432 432 376 S 0.0 0.0 0:00 klogd
522 root 9 0 1464 1464 1324 S 0.0 0.1 0:02 sshd
545 root 8 0 620 620 552 S 0.0 0.0 0:00 crond
2166 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
2167 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
2168 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
2169 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
2170 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
2171 root 9 0 412 412 356 S 0.0 0.0 0:00 mingetty
32633 bishal 9 0 1448 1448 1100 S 0.0 0.1 0:00 bash
598 root 9 0 992 992 816 S 0.0 0.1 0:00 su
599 root 9 0 1472 1472 1116 S 0.0 0.1 0:00 bash
3149 bishal 9 0 1444 1444 1100 S 0.0 0.1 0:00 bash
3178 bishal 9 0 1016 1016 772 R 0.0 0.1 0:00 top
6315 root 9 0 664 664 592 S 0.0 0.0 0:00 crond
6321 root 9 0 888 888 772 S 0.0 0.0 0:00 Run-MRTG
===============================================
ping statistics to server lan interface from lan computer

C:\Users\Carol>ping 202.79.xx.xx -t

Pinging 202.79.xx.xx with 32 bytes of data:
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=29ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=39ms TTL=63
Request timed out.
Reply from 202.79.xx.xx: bytes=32 time=216ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Request timed out.
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Request timed out.
Reply from 202.79.xx.xx: bytes=32 time=4ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=7ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=2ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=117ms TTL=63
Reply from 202.79.xx.xx: bytes=32 time=1ms TTL=63

Ping statistics for 202.79.xx.xx:
Packets: Sent = 42, Received = 39, Lost = 3 (7%
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 216ms, Average = 11ms


Thank you
 
Old 05-11-2010, 09:50 PM   #4
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
You could try optimizing the kernel by tuning the TCP options in /etc/sysctl.conf:

http://www-didc.lbl.gov/TCP-tuning/linux.html

You said it yourself tho, when mrtg is off, no packets are dropped. That being the case, it's probably performance related, although the CPU stats don't really indicate so.
 
Old 05-12-2010, 03:53 AM   #5
ohcarol
Member
 
Registered: Dec 2004
Location: Nepal
Posts: 86

Original Poster
Rep: Reputation: 15
hi LVsFINEST,

That link didn't solve my problem either. All tcp tuning values are in default as it is mentioned that sites.


Thank you
 
Old 05-12-2010, 10:34 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
So what's the spec (bandwidth) of the eth card in the server and the clients? Ditto the cables? Its probably(?) the server NIC getting overloaded.
 
Old 05-13-2010, 12:50 AM   #7
ohcarol
Member
 
Registered: Dec 2004
Location: Nepal
Posts: 86

Original Poster
Rep: Reputation: 15
Total bandwidth usage is not more than 5mb in total download and 2mb in upload. Statistics of ifconfig:

[root@gw-shaper]$ /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:76:6E:C8:2F
inet addr:202.79.XX.XXX Bcast:202.79.XX.XX Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60016379 errors:99 dropped:688 overruns:77 frame:0
TX packets:58095854 errors:0 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:100
RX bytes:790600181 (753.9 Mb) TX bytes:366399078 (349.4 Mb)
Interrupt:21 Base address:0xb000

[root@gw-shaper]$ /sbin/ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:00:54:58:06:1A
inet addr:202.79.XX.XXX Bcast:202.79.XX.XXX Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69437412 errors:0 dropped:0 overruns:0 frame:0
TX packets:68389044 errors:1 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:100
RX bytes:1912708047 (1824.1 Mb) TX bytes:2110181882 (2012.4 Mb)
Interrupt:17 Base address:0xdc00
 
Old 05-13-2010, 05:54 PM   #8
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
If you're running out of options, another thing you could try is hard setting the duplex on both ends. Don't set it to "auto".
 
Old 05-14-2010, 02:18 AM   #9
ohcarol
Member
 
Registered: Dec 2004
Location: Nepal
Posts: 86

Original Poster
Rep: Reputation: 15
ok I will try that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MRTG Graph Issue predatorz Linux - Software 3 10-06-2007 09:01 PM
Using MRTG to display packet loss and Jitter bzlaskar Linux - Networking 0 06-30-2006 11:57 PM
problem with mrtg graph orko Linux - Networking 2 02-02-2005 05:31 AM
specific port traffic graph using mrtg newpenguin Linux - Networking 7 12-16-2003 06:00 PM
Severe Packet Loss on Internet Traffic blongden Linux - Networking 2 09-18-2003 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration