LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-14-2012, 04:32 AM   #1
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
How to increase the swap memory for mysql in centos 6.2


Hi all,
One of my centos machine i want to increase of swap memory for mysql .

Quote:
[root@example ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 537016 77028 14096 188032 38 43 102 61 108 316 1 1 97 2 0
Quote:
[root@example ~]# sudo dd if=/dev/zero of=/mnt/file.swap bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 2.78301 s, 193 MB/s
Quote:
[root@example ~]# mkswap /mnt/file.swap
mkswap: /mnt/file.swap: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=f2612905-e880-48b1-ae65-13dc93f101ce
Quote:
[root@example ~]# sudo swapon /mnt/file.swap
[root@example ~]# vi /etc/fstab
Quote:
[root@example ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b6c32

Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 6271 50056192 83 Linux
/dev/sda3 6271 6528 2064384 82 Linux swap / Solaris
Quote:
[root@example ~]# free -m
total used free shared buffers cached
Mem: 993 926 66 0 2 198
-/+ buffers/cache: 725 267
Swap: 2527 523 2004
Quote:
[root@example ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 535968 68376 2928 202980 38 43 102 68 108 317 1 1 97 2 0
[root@example ~]#
 
Old 06-14-2012, 05:32 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
And ... ?
 
Old 06-14-2012, 05:43 AM   #3
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Original Poster
Rep: Reputation: Disabled
Hi

Im trying to increase the swap memory for my mysql alone.whether its possible to allocate large amount of virtual memory to my mysql application . Tomcat i had increase the virtual memory by using following command in service export JAVA_OPTS="-Xms128m -Xmx512m" .In same way whether i can determine my mysql application to utilise lareger virtual memory at startup of mysql

Last edited by arun5002; 06-14-2012 at 06:43 AM.
 
Old 06-14-2012, 06:57 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Not directly - the system handles that automatically. Large memory users will (typically) use the swap most - if they actually use ("dirty") the memory.
In general, everything is done not to use swap - it's too slow compared to RAM.
 
  


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
Didnt use swap memory in CentOS 5.4 casualzone Linux - Software 2 02-27-2010 09:42 PM
LXer: Increase Swap Memory in Linux LXer Syndicated Linux News 0 04-10-2009 04:41 PM
Increase SWAP Space? your_shadow03 Linux - Newbie 2 01-30-2009 05:52 AM
Looking to increase swap partition Patgod Linux - Newbie 8 03-29-2004 06:46 PM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 08:58 PM


All times are GMT -5. The time now is 06:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration