LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 03:32 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
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, 04:32 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,160

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
And ... ?
 
Old 06-14-2012, 04:43 AM   #3
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

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 jsaravana87; 06-14-2012 at 05:43 AM.
 
Old 06-14-2012, 05:57 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,160

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:23 PM.

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