Operating System - HP-UX
1837984 Members
2825 Online
110124 Solutions
New Discussion

Re: Why is my system swapping??

 
Naveej.K.A
Honored Contributor

Why is my system swapping??

Hi,
Got a RP5470 with 1GB RAM running a customized ERP on Oracle 7.1.4. There is an average of 65 users connected at a time. In the last two weeks, i have noticed that the system had swapped 2 times and this happened in the weekend, when the system load is too low i.e. an average of 10-15 users. I'm not able to figure where the things have gone wrong...

Regds
Naveej
practice makes a man perfect!!!
16 REPLIES 16
Patrick Wallek
Honored Contributor

Re: Why is my system swapping??

Are you sure it is just on the weekends? 1GB of RAM is not much for an Oracle machine.

What did you see when you did a 'swapinfo -tam'? What was the output? What else was going on? Anyone running any reports at that time? It would be good if you had Measureware running so you could go back and look and see what was going on at the time.
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

I don't have any performance monitoring software installed.

It happened on saturday morning.. i rebooted the server and when on monday morning when i came and checked i found it was swapping. The output of the swapinfo -tam is attached herewith.....
practice makes a man perfect!!!
Con O'Kelly
Honored Contributor

Re: Why is my system swapping??

Hi

Check how much free memory you have. Use:
# vmstat 2 10

Check the 'free' column & multiply this value to give you the amount of free memory in KB.
Also look at the 'po'(pageout) column - Is there any pageouts occuring?

As Patrick said 1GB is a very small amount of memory for Oracle.

In the absence of Measureware I'd dlso think about setting up sar to collect performance data.
Put an entry in cron as follows:
0,15,30,45 * * * * /usr/lbin/sa/sa1

This will collect performance data every 15 mins. Ensure you have created the directory /var/adm/sa.
See man sa1 for more details.

Cheers
Con
Con O'Kelly
Honored Contributor

Re: Why is my system swapping??

Sorry, should have said:
"multiply this value by 4 to give you the amount of free memory in KB."

Cheers
Con
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

hi con,

I get a free memory of around 220MB with the vmstat command and shows the p0 column always zero...
sar is already running in crontab for collecting the data.

regds
naveej
practice makes a man perfect!!!
Mark Grant
Honored Contributor

Re: Why is my system swapping??

I think you need to determine what is running when you are swapping. How about writing the result of a "ps -ef" to a file every five or ten minutes over the weekend and see what's actually running. Alternatively you can do a "top -d 1 -f filename".

Are your backups an issue here?
Never preceed any demonstration with anything more predictive than "watch this"
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

Now that i have done a reboot, i have got currently 56 users logged in and the system is working fine.

pls find attached the current output of swapinfo -tam.

Mark, what u said could be an issue. could be something wrong with the backups!!!!!

Regds
Naveej
practice makes a man perfect!!!
Mark Grant
Honored Contributor

Re: Why is my system swapping??

Naveej,

Often is, if you are running Omniback/Data Protector, you could try reducing the number of disk agents writing to tape at the same time.
Never preceed any demonstration with anything more predictive than "watch this"
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

i've got a simple tar backup scheduled using cron on my dds4 tape drive

regds
Naveej
practice makes a man perfect!!!
David Andrews_1
Advisor

Re: Why is my system swapping??

You are using TAR to backup an Oracle database?

While this can be done, it is not Oracle's preferred method.

If the Oracle database is not shut down prior to the backup, then the datafiles will be corrupt.

Generally RMAN (Oracle's Recovery Manager) scripts are used to backup and restore oracle databases.
Steven E. Protter
Exalted Contributor

Re: Why is my system swapping??

You are swaping because you barely have enough memory for the OS, much less the database.

You don't mention your OS version, but at that level you should expect some swapping.

I'm attaching a performance data collection script that lets you collect and analyze data over time.

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
Bill Hassell
Honored Contributor

Re: Why is my system swapping??

Actually, swapping is just fine as long as it hardly ever occurs. Oracle needs MANY GIGABYTES of RAM unless you have a small database with very low activity and efficient SQL and indexes (or your users have lots of free time to waste). Most Oracle DBAs want more than 900 megs of SGA so performance is acceptable. If the po (page out) column of vmstat is almost always zero, ignore the swapinfo information. There is an artifact found in memory mapped files that will cause page outs to occur but again, if the rate is single digits and mostly zero, you have no performance problems related to swap.


Bill Hassell, sysadmin
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

Thanks for all your replies. But i'm still to find out why it swapped? Last two days there wasn't any swapping and things were fine.
david, I don't take backup of those dmp files directly, instead i export them first and take backup of those dmps.
I'm running HPUX 11i on the server and i've fairly small database. dbas have configure the sga to use only 250MB of my memory.

I've checked my backup scripts and it seems no wrong in that. Its still a mystery how in the night when the load is too low, the things started swapping

Regds
Naveej
practice makes a man perfect!!!
Rupesh_1
Occasional Advisor

Re: Why is my system swapping??

Hi Naveej
I suggest you to install Glance plus software which is free (Evaluation Copy for 60 days is in one of the application CD's)

With this software you could lookout for the right bottelneck and sort out these isssues.

Cheers
Rups
Naveej.K.A
Honored Contributor

Re: Why is my system swapping??

Dear rupesh,
Thanks for the suggestion....
But i have got the 60 days already expired

Regards
Naveej
practice makes a man perfect!!!