Webmaster Forumu

Geri git   Webmaster Forumu > Webmaster Kaynak Eğitim Tanıtım Hizmet > MySQL Veritabanı SQL
Kayıt ol Blogs Yardım Üye Listesi Ajanda iTrader Forumları Okundu Kabul Et

MySQL Veritabanı SQL SQL MySQL Access MSSQL Oracle Veritabani Database

Cevapla Add This!
 
LinkBack (3) Seçenekler Stil
  #11 (permalink)   iTrader 
Alt 2006-06-19, 02:47
culpable - ait Kullanıcı Resmi (Avatar)
Gold Member
 
Üyelik tarihi: Nov 2005
Mesajlar: 1.034
Tecrübe Puanı: 3
iTrader: %0/0
culpable is on a distinguished road
Standart

Alıntı:
iyinet´isimli üyeden Alıntı
MySQL icin yapilabilecek pek cok optimizasyon yontemleri mevcut.
Oncelikle /etc/my.cnf dosyani buraya koymakla ise basla istersen.
Adim adim sorunun uzerinde ilerleyelim...
tesekurler adminim
fakat serveri kullanmiyorum artik bosuna ugrasmaya degmez
Alıntı ile Cevapla

  #12 (permalink)   iTrader 
Alt 2006-06-19, 03:04
Gold Member
 
Üyelik tarihi: Feb 2005
Mesajlar: 1.933
Tecrübe Puanı: 4
iTrader: %100/10
disconnect will become famous soon enoughdisconnect will become famous soon enough
Standart

Alıntı:
iyinet´isimli üyeden Alıntı
MySQL icin yapilabilecek pek cok optimizasyon yontemleri mevcut.
Oncelikle /etc/my.cnf dosyani buraya koymakla ise basla istersen.
Adim adim sorunun uzerinde ilerleyelim...
bu optimizasyonlar windows servelar içinde geçerlimidir?
Alıntı ile Cevapla

  #13 (permalink)   iTrader 
Alt 2006-06-20, 13:45
ZiRVeDeKiLeR - ait Kullanıcı Resmi (Avatar)
Member
 
Üyelik tarihi: Feb 2006
Mesajlar: 346
Tecrübe Puanı: 2
iTrader: %0/0
ZiRVeDeKiLeR is an unknown quantity at this point
Standart

Alıntı:
iyinet´isimli üyeden Alıntı
my.cnf icerigini ve top ciktisini buraya yapistirin

Kod:
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
max_connections = 1000
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
# log-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id       = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin

# Point the following paths to different dedicated disks
#tmpdir         = /tmp/
#log-update     = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Kod:
top - 14:24:23 up 4 days, 19:36,  1 user,  load average: 5.23, 3.17, 2.94
Tasks: 166 total,   1 running, 165 sleeping,   0 stopped,   0 zombie
Cpu(s): 93.5% us,  6.0% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.2% hi,  0.3% si
Mem:   2009456k total,  1906912k used,   102544k free,    53108k buffers
Swap:   530136k total,     4876k used,   525260k free,  1078392k cached


Yukaridaki my.cnf standart serveri aldigim gün verilen ayarlar. Ben sadece max_connections = 1000 satirini ekledim. bende load average zaman zaman 60 lara kadar cikabiliyor belki bununla ilgisi yok ama kullandigim sistem php ve mysql tabanli oldugu icin sanirim bununda faydasi olacaktir. Aslinda bu konuda bir konu acmistim ama burayi görünce burayada yazayim dedim umarim kusuruma bakmazsiniz.

Kullandigim sistem suse & confixx premium 34000MHz 2048MB Ram alttaki alintida phpmyadmin girisinden...

Kod:
 Welcome to phpMyAdmin 2.6.1

MySQL 4.0.21-Max running on localhost as root@localhost

Konu ZiRVeDeKiLeR tarafından (2006-06-20 Saat 14:25 ) değiştirilmiştir..
Alıntı ile Cevapla

  #14 (permalink)   iTrader 
Alt 2006-06-20, 15:59
iyinet - ait Kullanıcı Resmi (Avatar)
Paylaşım için teşekkürler
 
Üyelik tarihi: Sep 2002
Mesajlar: 6.051
Blog Entries: 2
Tecrübe Puanı: 3
iTrader: %100/6
iyinet is just really niceiyinet is just really niceiyinet is just really niceiyinet is just really nice
Standart

Alıntı:
disconnect´isimli üyeden Alıntı
bu optimizasyonlar windows servelar içinde geçerlimidir?
Bilemiyorum, windows ortaminda denemedim.
__________________
Forum Reklam Site Reklam
Alıntı ile Cevapla

  #15 (permalink)   iTrader 
Alt 2006-06-20, 16:04
iyinet - ait Kullanıcı Resmi (Avatar)
Paylaşım için teşekkürler
 
Üyelik tarihi: Sep 2002
Mesajlar: 6.051
Blog Entries: 2
Tecrübe Puanı: 3
iTrader: %100/6
iyinet is just really niceiyinet is just really niceiyinet is just really niceiyinet is just really nice
Standart

Once my.cnf in bir yedegini al.
my.cnf in optimize edilmis sekli ile asagida:




# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-innodb
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 512
max_connections = 500
query-cache-type = 1 # query cache mysql i hizlandirir, 1=acik
query-cache-size = 64M # kullanilacak query cache miktari
max_allowed_packet=64M # mysqlhotcopy icin
wait_timeout=3600 # mysqlhotcopy icin
#sort_buffer_size = 512K
#net_buffer_length = 8K
#read_buffer_size = 256K
#read_rnd_buffer_size = 512K
#myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
# log-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin

# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

# The safe_mysqld script
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
__________________
Forum Reklam Site Reklam
Alıntı ile Cevapla

  #16 (permalink)   iTrader 
Alt 2006-06-20, 16:51
ZiRVeDeKiLeR - ait Kullanıcı Resmi (Avatar)
Member
 
Üyelik tarihi: Feb 2006
Mesajlar: 346
Tecrübe Puanı: 2
iTrader: %0/0
ZiRVeDeKiLeR is an unknown quantity at this point
Standart

@iyinet

Cok tesekkürler bakalim durum ne olacak...
Alıntı ile Cevapla

  #17 (permalink)   iTrader 
Alt 2006-06-22, 01:46
Member
 
Üyelik tarihi: Sep 2003
Mesajlar: 451
Tecrübe Puanı: 4
iTrader: %100/1
hukuki is on a distinguished road
Standart

Windows server için de geçerlidir.
__________________
http://www.hukuki.net
Alıntı ile Cevapla

  #18 (permalink)   iTrader 
Alt 2006-12-18, 08:24
Member
 
Üyelik tarihi: Feb 2006
Mesajlar: 460
Tecrübe Puanı: 2
iTrader: %0/0
SonSahne is on a distinguished road
Standart

Aynı dertten bende muzdaribim 1 haftadır. ne yaptıysam bir çözüm üretemedim. Sizin söylediklerinizide uyguladım, ama mysql yine sistemde Cpu'yu %99'luk veya daha yüksek kullanıma ulaştırıyor. bende bulunan my.cnf dosyası boştu aslında sizin makalelerinize göre editledim.

Serv. Özellikleri Pentium D 3.4 2048 Ram centOS4

my.cnf dosyam

Kod:
[mysqld]
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-innodb
key_buffer = 384M
table_cache = 512
max_connections = 1000
query-cache-type = 1
query-cache-size = 64M
max_allowed_packet=64M
wait_timeout=30
safe-show-database
set-variable=local-infile=0
sort_buffer=512K
myisam_sort_buffer_size=8M
query_cache_limit = 8M
thread_cache_size = 128
max_allowed_packet = 32M
thread_concurrency=4

[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
Yanlışlarımı ve yapmam gerekenler konusunda yardımcı olabilirmisiniz acaba? teşekkürler..
Alıntı ile Cevapla

  #19 (permalink)   iTrader 
Alt 2006-12-18, 08:39
Caesar - ait Kullanıcı Resmi (Avatar)
Platinum Member
 
Üyelik tarihi: Jun 2006
Nerden: /dev/null
Mesajlar: 2.576
Tecrübe Puanı: 0
iTrader: %100/6
Caesar will become famous soon enoughCaesar will become famous soon enough
Standart

Lütfen mysql5 kullanınız tek pide düşecektir mysql çalışması. Ondan sonra bir sorun yaşayacağınızı sanmıyorum.
Alıntı ile Cevapla

  #20 (permalink)   iTrader 
Alt 2006-12-18, 16:52
Member
 
Üyelik tarihi: Feb 2006
Mesajlar: 460
Tecrübe Puanı: 2
iTrader: %0/0
SonSahne is on a distinguished road
Standart

Cevabın için teşekkürler. ama ben zaten mysql5 kullanıyorum arkadaşım
Alıntı ile Cevapla

Cevapla


LinkBacks (?)
LinkBack to this Thread: http://forum.iyinet.com/mysql-veritabani-sql/29477-mysql-cpu-kullan-m-my-cnf-optimizasyonu.html
Konuyu Başlatan For Type Tarih
Load sorunu yaşayanlar için genel tartışma konusu - vBulletin SEO Forums This thread Pingback 2007-12-05 17:27
Vbseo i&#351;lemciyi çok kas&#305;yor - Page 2 - vBulletin SEO Forums This thread Pingback 2007-06-14 21:38
Vbseo i&#351;lemciyi çok kas&#305;yor - vBulletin SEO Forums This thread Pingback 2007-04-13 23:00

Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
mysql in visual basic ile kullanılması Anonymous MySQL Veritabanı SQL 5 2007-08-29 23:00
2 Ay Öde 3 Ay Kullan Kampanyaları Uzak444 Dedicated CoLocation 0 2007-01-17 16:33
$50 lık adwords hesapları 13 ytl kullanıma hazır.. firar Google Adwords 4 2006-10-31 07:59
2 Ay Öde 3 Ay Kullan Kampanyası Uzak444 Dedicated CoLocation 0 2006-10-20 00:00
3 Ay Peşin Öde, 1 ay ücretsiz kullan! Dedicated ve VPS LNWServers Dedicated CoLocation 17 2006-06-09 20:14


Bütün Zaman Ayarları WEZ +2 olarak düzenlenmiştir. Şu Anki Saat: 19:27 .


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

Firefox