Operating System - HP-UX
1832645 Members
3109 Online
110043 Solutions
New Discussion

Network memory utilization

 
LucianoCarvalho
Respected Contributor

Network memory utilization

Hi Guys! Is there any command to verufy how much memory the system is reserving for network buffer and how much of that is been used at the moment?

thanks
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Network memory utilization

I'd start here.

sar -b 1 10800 > /tmp/HP_perf_info.buffer

I'm attaching a script that might give you other ideas.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Norbert  Németh
New Member

Re: Network memory utilization

You can check ndd command. (man ndd)

e.g.

ndd -h sup | grep buf
tcp_recv_hiwater_max - Upper bound on TCP receive buffer size
tcp_xmit_hiwater_max - Upper bound on TCP send buffer size
udp_recv_hiwater_max - Upper bound on UDP receive buffer size
rawip_recv_hiwater_max - The maximum size of the RAWIP receive buffer
socket_buf_max - Sets maximum socket buffer size for AF_UNIX
socket_udp_rcvbuf_default - Sets the default receive buffer size for
socket_udp_sndbuf_default - Sets the default send buffer size for

rick jones
Honored Contributor

Re: Network memory utilization

Looks like sar -b reports buffer cache statistics, not memory stats for networking. Also, the ndd settings mentioned are per-socket _limits_ not actual allocations.

Under HP-UX memory isn't "reserved" for networking - that is there is no separate tunable limit to the quantity of memory used by networking. It "competes" for memory from the global pool(s) just like anything else.

I do not think there is one command that tells how much memory is allocated to "networking." You might get a guess from looking at the bytes queued to sockets data in the output of netstat -an. Of course, that is a quite _lower_ bound - it is just a count of data bytes, not overhead bytes. You could also guestimate some quantity of memory per TCP/UDP/etc endpoint - not sure what the quantity to use would be though.

There will be buffers allocated and posted to NICs for inbound DMA, but the lanadmin stats do not show how many buffers are queued for inbound. They will show the quue length for outbound buffers. Counting those _could_ be a double count as they will be reflected in the send queue stats from netstat -an for TCP. However, they will not be a double count for UDP since UDP does not store anything in the send socket buffer.

Is there anything in particular that makes you think you have a problem with memory usage by networking?
there is no rest for the wicked yet the virtuous have no pillows
Caesar_3
Esteemed Contributor

Re: Network memory utilization

Hello!

Use this will show you info about: ndd -h sup
Check in man you will find more options.

Caesar
LucianoCarvalho
Respected Contributor

Re: Network memory utilization

It's just to monitor that utilization in my system and if there were a limit make sure that the system is not running at it.
So, if I understand correctly, HP-UX will use how much memory it need for network memory buffer as soon as there is memory available? Is that correct? And if it is correct I should be concerned with the memory available for the system as a whole and not try to find out the utilization of memory for network buffer I think.
rick jones
Honored Contributor

Re: Network memory utilization

indeed, if you just want to monitor, then you can know that networking may be running out of memory if the system runs out of memory - it will not run-out before that point. fwiw, networking has been that way since HP-UX 8.0 :)
there is no rest for the wicked yet the virtuous have no pillows