LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-26-2006, 06:50 AM   #1
raamcm
LQ Newbie
 
Registered: May 2006
Posts: 8

Rep: Reputation: 0
Unhappy Swap is not use


Dear Folks,

I have small problem with my RHEL AS-3.which configuration is Dell server and 8GB physical ram and 16GB swap and running in Oracle DB and along with Application server.The problem is not detect or use the swap size,when i had change the kernel-smp and kernel-hugemem also.

Server is very slow performance and hanging in some time also.

Please help me guys solve this problem......
 
Old 05-26-2006, 07:16 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
What is the output for "swapon -s" and "free" ?
 
Old 05-26-2006, 11:36 AM   #3
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Rep: Reputation: 30
OK, first of all I assume you have in-kernel support for swap?

# cd /usr/src/linux
# make menuconfig
"General Setup -> Support for paging of anonymous memory (swap)"

Make sure that's enabled, then do what marozsas said and run swapon -s.

If that doesn't display your swap partition, make double-sure you've got the right device, and say this (as root):
# mkswap /dev/sda3
# swapon /dev/sda3

Where /dev/sda3 is your swap partition.

If it still doesn't work after that, or if swapon -s listed your partition and you're sure it's not working, post back.

 
Old 06-01-2006, 06:02 AM   #4
raamcm
LQ Newbie
 
Registered: May 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Dear Guys,

Sorry for my late reply,

i give below lines are free and swapon -s commands output.

[root@server root]# free
total used free shared buffers cached
Mem: 8195692 8172252 23440 0 696560 4533388
-/+ buffers/cache: 2942304 5253388
Swap: 16579072 0 16579072

[root@server root]# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 16579072 0 -1
 
Old 06-01-2006, 07:14 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
Memory in general, and swap in particular, is not your problem.
Just to be sure, let's see the output of "cat /proc/meminfo".
 
Old 06-01-2006, 07:18 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
Looks like the swap is active and it has 15.8Gbytes, but nothing is in use, what is a good thing. You have lots of memory. I don't think swap is the problem here.
 
Old 06-01-2006, 09:47 AM   #7
raamcm
LQ Newbie
 
Registered: May 2006
Posts: 8

Original Poster
Rep: Reputation: 0
But server is always very slow performance only.when i access any one Oracle database it's take a lot of time and sometime it will get hang also.
Any way i listed that meminfo below lines.
cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 8392388608 8349491200 42897408 0 713510912 4631236608
Swap: 16976969728 0 16976969728
MemTotal: 8195692 kB
MemFree: 41892 kB
MemShared: 0 kB
Buffers: 696788 kB
Cached: 4522692 kB
SwapCached: 0 kB
Active: 2848752 kB
ActiveAnon: 1355128 kB
ActiveCache: 1493624 kB
Inact_dirty: 2648424 kB
Inact_laundry: 670384 kB
Inact_clean: 199236 kB
Inact_target: 1273356 kB
HighTotal: 5242872 kB
HighFree: 21816 kB
LowTotal: 2952820 kB
LowFree: 20076 kB
SwapTotal: 16579072 kB
SwapFree: 16579072 kB
Committed_AS: 4472764 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
 
Old 06-01-2006, 10:02 AM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
How about your disks ? Do you have DMA active for your disks ? Do you have enabled the 32bit mode ? Advanced Power Management is off ? How its perform ? (check with hdparm)

And what about the filesystem ? ext3 or reiser ?

May be your problem is not related to your hardware or OS, but a Oracle setup issue.

How did you setup Oracle ? The database is in the regular filesystem or it is in a raw partition ?

I am not a Database guy, but I know this thing can be very complicated to setup properly. A experienced DBA could help you.
 
Old 06-01-2006, 05:33 PM   #9
Walman
Member
 
Registered: Jun 2004
Location: Venezuela
Distribution: RHEL ,Ubuntu, Slax, Kali
Posts: 95

Rep: Reputation: 15
Guys

The rule that swap has to double of the Ram memory is not a straight line relationship . If you need 16 Gb of ram you should be looking at increasing you RAM . Remember , access to local memory is faster , by a lot , than accessing a space in the disk . I should be looking at having a swap memory of about 2 Gb maximun and having the 16 Gb of RAM if you machine can hold that .
 
Old 06-01-2006, 09:34 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
Quote:
Originally Posted by raamcm
But server is always very slow performance only.when i access any one Oracle database it's take a lot of time and sometime it will get hang also.
Unless you can provide some evidence, I'd be looking at an I/O (and/or setup as marozsas said) rather than a CPU/memory problem. Next time you start to see a problem, run something like the following - adjust the numbers and filename as appropriate
Code:
(vmstat -n 15 40 > vmstatlog_`date +%F`) &

Last edited by syg00; 06-01-2006 at 09:36 PM.
 
Old 06-01-2006, 11:20 PM   #11
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
You have 8G of RAM, most of which is being used. You also have 16G of swap, none of which is being used. This makes perfect sense, because swap only gets called into action when the load exhausts physical RAM and the system is forced to write memory pages to disk.

Overall, if your performance is slower than expected, I'd bet it has nothing to do with your machine, and everything to do with Oracle. Specifically, have you indexed your tables appropriately? Do your queries use those indexes? Are you allocating storage efficiently with your dynamic tables (eg, are PCTFREE and PCTUSED set appropriately?), etc. I agree with syg00 that this is most likely an I/O inefficiency within Oracle as opposed to either a hardward or Linux issue. Good luck with it
 
Old 06-02-2006, 03:00 AM   #12
raamcm
LQ Newbie
 
Registered: May 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Dear syg00,

I listed below lines are the vmstat information.

[root@server tmp]# (vmstat -n 15 40 > vmstatlog_`date +%F`) &
[root@server tmp]# cat vmstatlog_2006-06-02
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy wa id
0 0 0 88412 629120 4666768 0 0 1 5 5 8 1 1 2 0
0 0 0 88412 629136 4666768 0 0 0 37 109 1186 0 0 1 98
0 0 0 85300 629156 4666832 0 0 3 67 127 1247 1 1 2 95
0 0 0 84492 629180 4666832 0 0 0 50 115 1189 0 0 2 97
1 0 0 84988 629188 4666840 0 0 0 43 119 1210 1 2 3 95
2 0 0 84220 629196 4666840 0 0 0 37 117 1189 1 1 2 96

Last edited by raamcm; 06-02-2006 at 05:30 AM.
 
Old 06-02-2006, 04:49 AM   #13
vemuramesh
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
swap not in user

Hi man
ur problem is good. Actually ur swap is set to norma kernel only.
when u change to smp or begmem just restart swap

just switch off and on the swap then automatically it dected the swap space.

regard
vemuramesh
QAEngineer & system admin
 
Old 06-02-2006, 05:24 AM   #14
raamcm
LQ Newbie
 
Registered: May 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by vemuramesh
Hi man
ur problem is good. Actually ur swap is set to norma kernel only.
when u change to smp or begmem just restart swap

just switch off and on the swap then automatically it dected the swap space.
I can't understand what you are talking about it.now that server is running for smb kernel only.

Last edited by raamcm; 06-02-2006 at 05:29 AM.
 
Old 06-02-2006, 06:14 AM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
Quote:
Originally Posted by raamcm
I listed below lines are the vmstat information.
Is this data from a time-frame when you experienceed the problem with responsiveness/lockup ???.
I see no evidence of anything adverse - me not knowing the product, it must be added. Ignoring the first line which may be incomplete, the only unusual numbers are the interrupt rate and the context switch rate.

These may be normal (FSVO "normal") for Oracle ... I have no experience there.
Certainly nothing to suggest a memory/swap problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 01:57 PM
Is my swap gone? jasone Linux - General 6 04-27-2005 05:07 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 08:58 PM
Swap punker22 Linux - Newbie 3 10-14-2003 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:44 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