Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check the memory usage at a point in time, for unix system?
joel-garry_at_home.com (Joel Garry) wrote in message news:<91884734.0308051443.7f5d8e43_at_posting.google.com>...
> jeffyee_at_hotmail.com (Jeffrey Yee) wrote in message news:<ec4cec95.0308040216.7022e36a_at_posting.google.com>...
> > Hi,
> >
> > I have a RP5470 server, with 2G of memory, 4 CPUs, running on HP-UX
> > B.11.11 (11i) os. I have intention to follow the rule of thumb of
> > allocating 55% of the memory for the only Oracle instance.
> >
> > Unfortunately, after allocating 210M of memory to SGA (SGA_MAX_SIZE),
> > the PerfView (HP resource & performance management product) says that
> > the GLB_MEM_UTIL (% of physical memory in use) is 100%. I don't quite
> > believe what I see. Is there a way that I can confirm this, by running
> > some UNIX command? I'm looking for information similar to windows 2000
> > Server Task Manager/Performance tab, giving the total memory usage and
> > the total physical memory.
>
> try
>
> swapinfo -a
> dmesg|grep Phys
>
> There really isn't a direct relation with windows memory usage, unix
> shares more stuff and allows more sophisticated administration.
> swapinfo isn't likely to agree with dmesg as the admin can allocate
> memory to the OS - see kernel help description of unlockable memory,
> and hp.com for descriptions of swap. It is possible to allocate too
> much memory to the kernel, and be swapping when you shouldn't. If SGA
> gets swapped, you have big problems. Swap needs to be allocated on
> disk, but not necessarily used.
>
> IME, that is kind of small physical memory, as well as small SGA. How
> many users do you have doing what operations?
>
> # swapinfo -a
> Kb Kb Kb PCT START/ Kb
> TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
> dev 4194304 0 4194304 0% 0 - 1
> /dev/vg00/lvol2
> dev 1228800 0 1228800 0% 0 - 1
> /dev/vg99/lvol01
> reserve - 2599480 -2599480
> memory 6504892 4206896 2297996 65%
> [ now I go start up a 3-tier thin client ]
> # swapinfo -a
> Kb Kb Kb PCT START/ Kb
> TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
> dev 4194304 0 4194304 0% 0 - 1
> /dev/vg00/lvol2
> dev 1228800 0 1228800 0% 0 - 1
> /dev/vg99/lvol01
> reserve - 2610380 -2610380
> memory 6504892 4207128 2297764 65%
>
> So you can see each time I start up a session for my particular app I
> use up about 4207128-4206986=142 new Kbytes. But if I look at ps
> -efl, I see I'm using 11,835 pages. But most of that is shared or
> something. So the numbers are kind of meaningless until you start
> swapping, then they are more meaningless. Glance or your perfview
> might tell you more, but I don't have those at the moment. So this
> PCT USED is about as useful as anything. This machine has 8G
> physical, 2 instances with 500 and 860M SGA's, respectively, generally
> running around 150 sessions of OLTP and ocassional batch. Only
> complaints stem from poorly designed apps, of course.
>
> >
> > Please please help, as my database buffer cache hit ratio is only
> > about 30%. Thank you in advance.
>
> Depending on what you are doing, that may or may not be bad, although
> I suspect it is if you are posting. Which docs are you using to
> decide?
>
> Also, check out the docs about what rounding SGA_MAX_SIZE does. What
> does SHOW SGA say?
>
> jg
Well, I'm really overloaded by information, and have difficulty digesting it. Here are the commands I ran:
smms: / > sar -bmw 5 5
HP-UX smms B.11.11 U 9000/800 08/06/03
14:37:12 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
msg/s sema/s swpin/s bswin/s swpot/s bswot/s pswch/s 14:37:17 3 713 100 5 97 95 0 0 0.00 2.00 1.00 0.0 1.00 0.0 816 14:37:22 0 6006 100 965 7563 87 0 0 0.00 1.00 1.00 0.2 1.00 0.0 765 14:37:27 0 514 100 4 33 88 0 0 0.00 1.60 1.00 0.0 1.00 0.0 621 14:37:32 0 2112 100 332 2129 84 0 0 0.00 1.80 1.00 0.2 1.00 0.0 190 14:37:37 0 4241 100 634 5424 88 0 0 0.00 2.20 1.00 0.0 1.00 0.0 322 Average 1 2714 100 387 3045 87 0 0 Average 0.00 1.72 Average 1.00 0.1 1.00 0.0 543
Comment: Can I conclude that lwrit/s is quite high, and %wcache is quite low?
smms: / > ipcs -mb
IPC status from /dev/kmem as of Wed Aug 6 14:38:31 2003
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0x411c52a3 --rw-rw-rw- root root 348 m 1 0x4e0c0002 --rw-rw-rw- root root 61760 m 2 0x41203020 --rw-rw-rw- root root 8192 m 3 0x301c0842 --rw-rw-rw- root root 1048576 m 3844 0x1931541c --rw-r----- oracle dba 252411904 m 5 0x5e10005c --rw------- root root 512 m 9990 0x41204794 --rw-rw-rw- root sys 8785 m 263 0x4120478f --rw-rw-rw- root root 8785 m 264 0x00000000 D-rw------- root sys 46084
Comment: Seems like majority of the shared memory is used by oracle. Looks ok, I guess.
smms: /usr/sbin > vmstat -S 5 5
procs memory page faults cpu r b w avm free si so pi po fr de sr in sy cs us sy id 1 1 0 208868 8640 60906 60941 15 1 0 0 17 1238 166574 356 8 13 79 1 1 0 208868 6768 2 0 17 0 0 0 0 1298 11449 511 24 4 72 2 0 0 225776 7000 4 31 22 0 0 0 0 1808 16791 796 32 8 60 2 0 0 225776 7000 5 5 18 0 0 0 0 1240 9417 711 29 3 68 2 1 0 242198 7687 5 5 40 0 0 00 1942 23815 899 16 9 75
Comment: Not sure if si, so, pi & po is normal.
smms: / > swapinfo -a
Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 4194304 286596 3907708 7% 0 - 1 /dev/vg00/lvol2 reserve - 972916 -972916
smms: / > dmesg | grep Phys
Physical: 2097152 Kbytes, lockable: 1545216 Kbytes, available: 1781580 Kbytes
This database is actually used by the HP Openview Operation application (use to monitor and manage all enterprise servers & databases). The number of sessions is usually about 25, but receive a lot of messages from those monitored nodes & databases (ex. server up/down, database up/down, etc...).
Even with all this information, I still don't know what I should do to allow the SGA to be bigger. Please help once again. Even the HP consultants is trying to figure out why. Received on Wed Aug 06 2003 - 02:10:39 CDT