Disk Tuning
May 5, 2009shared hosting env?
/etc/sysctl.conf:
vm.dirty_background_ratio = 20
vm.dirty_ratio = 60
blockdev --setra 16384 /dev/sda
shared hosting env?
/etc/sysctl.conf:
vm.dirty_background_ratio = 20
vm.dirty_ratio = 60
blockdev --setra 16384 /dev/sda
Can anybody show me how to tune the prefork module I don't know where to begin.
View 4 Replies View Relatedas part of a project I have lately been looking into various aspects of kernel tuning. Most notably lately tuning the TCP stack for more efficient memory usage/throughput.
Thought I would start this thread to mention some of the tools I'd found for doing testing and see what anyone else had to recommend.
So far my favorite of the bunch is nuttcp. Its easy to use and gives a very good idea of how much of your bandwidth you are able to utilize.
A few interesting web pages are as follows for anyone interested in the topic:
[url]- Tuning TCP for High Bandwidth Delay networks
[url]- TCP Tuning Cook book, some interesting information in there as well
[url]...formanceTuning - Performance Tuning TWiki. Has a list of useful tools, flags for existing tools and ways to monitor network performance from a system level, along with some suggestions of things to correct
i have this couple of windows 2003 servers, colocated in data center, i need to improve download speeds to our customers who are at least 200ms away, the end user is not using download accelarator,
is there a way that any settings to be done on server so that per thread speed can be increased, this case the server and client both have the ability to make a connection at more than a megabit speed. i did some search but all the articles point to end user and not the server saying to increase tcp window size etc.. not sure if those articles relate to server side changes.
I have Linux server with WHM/Cpanel with 2000 domains now my problem is.Mysql is using 90-100% CPU usage and 1500-2000 queries are running at a time so please guide me how can i optimize it and how can i tune mysql server so it doesn't go high.
I have configure my.cnf file as --->
max_allowed_packet = 4M
set-variable = max_connections=100
safe-show-database
query_cache_limit=1M
query_cache_size=128M
query_cache_type=1
key_buffer_size=256M
long_query_time = 3
table_cache=9092
how can i do this and any changes is require ?
I've noticed I'm getting high numbers for Handler_read_rnd_next.
How can I dig deeper to find out which tables/queries are causing this?
What have you found to be the best tuning sites for MySQL?
I'm getting into a bit of trouble. We have a weather site, and with all of the traffic, we're getting a little tapped out. When the loads hit between 134 and 160, the mail clients start to time out. Apache is still pretty fast, although it takes a little longer once you cross loads of 80, 5 second page loads, but when it hits between 130 and 160, I'm seeing 15-20 second page loads. DA is impossible above 80 but SSH is still very workable. Apache is tweaked to the max. I've kicked up some of the sizes in MySQL several weeks ago, and that did it them. However, we're taking on about 22,000 to 25,000 uniques an hour now. We normally can handle that no problem, but people are asking for maps a lot more now with the flooding and all. That requires a lot of MySQL lookups and the CPU creating a lot more maps. The maps I already cache for the duration, which is 15 minutes. The only horse I have left to whip is MySQL. After that, it will probably be a move to FreeBSD 7, but I'd like to throw in a few tweaks yet before we do that.
Quote:
MySQL Version 4.1.22-standard i686
Uptime = 0 days 0 hrs 4 min 15 sec
Avg. qps = 17
Total Questions = 4479
Threads Connected = 1
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
To find out more information on how each of these
runtime variables effects performance visit:
[url]
SLOW QUERIES
Current long_query_time = 10 sec.
You have 1 out of 4491 that take longer than 10 sec. to complete
The slow query log is NOT enabled.
Your long_query_time may be too high, I typically set this under 5 sec.
WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 6
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 2000
Current threads_connected = 1
Historic max_used_connections = 7
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating
MEMORY USAGE
Max Memory Ever Allocated : 96 M
Configured Max Per-thread Buffers : 10 G
Configured Max Global Buffers : 58 M
Configured Max Memory Limit : 10 G
Total System Memory : 3.95 G
Max memory limit exceeds 85% of total system memory
KEY BUFFER
Current MyISAM index space = 78 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 735
Key buffer fill ratio = 8.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
QUERY CACHE
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 4 M
Current query_cach_limit = 1 M
Current Query cache fill ratio = 14.83 %
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 2 M
Current record/read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 1.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
OPEN FILES LIMIT
Current open_files_limit = 10000 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 721 tables
You have 93 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 212 temp tables, 0% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 17754 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of indexes.
TABLE LOCKING
Current Lock Wait ratio = 1 : 76
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
how to make the changes in red? My server works good for awhile, but then gets REALLY REALLY slow.
I have a VPS system on the west coast of the US, and access it from the east coast. Sometimes I can get 1Mbyte/sec downloads, and other times it is as bad a 250KB/sec.
I have done some pings, and have not seen any packet loss. I've experimented with sysctl and changed some parameters to hopefully help, but really haven't seen much of a difference.
Does anyone have a recommendation as to what I could do different to squeeze a little more speed out of the connection? The problem is that from both sides of the US, I see ping times (depending on different ISPs on the east coast) from 80ms-120ms.
Here is what I've tuned so far:
kern.ipc.nmbclusters=65535
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendspace=78840
net.inet.tcp.recvspace=78840
net.inet.tcp.mssdflt=1460
net.inet.tcp.slowstart_flightsize=52
net.inet.tcp.inflight.min=29200
net.inet.tcp.sendbuf_inc=8760
net.inet.tcp.recvbuf_inc=8760
net.inet.tcp.sendbuf_auto=1
net.inet.tcp.recvbuf_auto=1
net.inet.tcp.delayed_ack=1
net.inet.tcp.delacktime=150
net.inet.tcp.inflight.enable=1
My server has a small SAS disk(about 73G), if I use 90% diskspace of it, is it good idea, will it harm the physical HDD?
View 6 Replies View RelatedI am looking for better disk performance. Due to the tight budget, I have to choose one of following options as my disk choice:
2 SATAII disk w/RAID0, 7200rpm, 32M cache for each disk
1 SAS disk, 15000rpm, 16M cache.
which one will be better and how better if other things(hardware & OS) are same?
can a Xen disk image be converted to a diskpartition?
Someone is asking whether I can host his disk image at his current host, which he is leaving for poor I/O (wonder why that would be ). I can host a diskimage, but I don't like diskimages (slow, and 100GB isn't very 'comfortable' either). Is there any way out there to convert a disk image into a normal partition?
I use apache with CentOS VPS hosting for my blog. I only host one blog in this VPS account. I have 1.5GB RAM and I have 7, 500 page preview per day. My page loading time is 2-3 seconds (according to the pingdom tool).
I want to know what is the best performance (faster web page loading) W3 Total cache option for VPS hosting blog. Currently I use Disk to enhance for page cache and database cache for disk.
Under Service Status, the "Disk (dev) 100 % ", what should I do?
FreeBSD with cPanel installed.
My server load is high, i checked and see everuthing is ok.
I think my sata disk cannot support my hard disk traffic.
Is it posible to check wich file used more hard disk traffic? (rpm speed)
how can i reduce this value
it was at 70% but after i did wget for abig backup and its failed i get this value in dev/sda5
Quote:
[root@xx]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 4.0G 3.6G 196M 95% /
/dev/sdb1 135G 111G 18G 87% /backup
/dev/sda1 198M 40M 148M 22% /boot
none 3.0G 0 3.0G 0% /dev/shm
/dev/sda8 76G 37G 36G 51% /home
/dev/sda7 2.0G 37M 1.9G 2% /tmp
/dev/sda3 25G 6.0G 18G 26% /usr
/dev/sda2 25G 20G 4.4G 82% /var
/tmp 2.0G 37M 1.9G 2% /var/tmp
alos
Quote:
[root@xxxx]# du -h --max-depth=1
1.8M ./tmp
8.0K ./opt
1.2M ./namedOLD
728K ./named
84K ./profiles
18G ./lib
423M ./cpanel
4.0K ./portsentry
28K ./empty
16K ./lost+found
288K ./run
672M ./cache
8.0K ./local
8.0K ./preserve
28K ./db
217M ./log
1.2M ./www
40K ./lock
16K ./crash
8.0K ./nis
8.0K ./net-snmp
24K ./yp
12K ./account
100K ./netenberg
170M ./spool
19G .
As per this [url]tutorial to set up disk quotas u need the /Home in the fstab file but how ever all i can find on my server is this:
LABEL=/ / ext3 defaults 1 1
LABEL=/disc2 /disc2 ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sdb2 swap swap defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
How do i go about setting quota for my users
I have a VPS that has hard limits for Disk Inodes at 500,000. I am currently over 430,000.
I am only using 24GB of 40GB of disk space.
How do I find what is gobbling up disk inodes? How can I find unused, abusive or unnecessary disk inodes and remove them?
# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vzfs 500000 430553 69447 87% /
/dev/simfs 500000 430553 69447 87% /tmp
/dev/simfs 500000 430553 69447 87% /var/tmp
none 2049640 95 2049545 1% /dev
From the Disk I/O performance is it better
1) to have main PHP file with 10 includes
2) all 11 files as one file
3) the difference is not big
Suppose
a) a low traffic site
b) a high traffice site
I have a server with cpanel/WHM. The file system says I am using 26GB of my 40GB:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 40G 26G 14G 66% /
none 257M 0 257M 0% /dev/shm
/usr/tmpDSK 243M 4.1M 226M 2% /tmp
/tmp 243M 4.1M 226M 2% /var/tmp
however the total of my accounts is less than 5GB.
How can I find out where all the other disk space is being used?
partitionning a server disk.
I have a 76 gb disk which is partitioned this way :
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb5 10317828 319000 9474712 4% /
/dev/sdb1 101086 24171 71696 26% /boot
none 3114756 0 3114756 0% /dev/shm
/dev/sdb7 36384624 17595080 16941268 51% /home
/dev/sdb8 1035660 34732 948320 4% /tmp
/dev/sdb3 10317860 4959788 4833952 51% /usr
/dev/sdb2 10317860 4847048 4946692 50% /var
/tmp 1035660 34732 948320 4% /var/tmp
I would like to create the same kind of partition on another server, but the disk is 750 gb and I need /var to be at least 30 gb big.
How big must the other partitions be ?
Regarding "none" ---> /dev/shm,
I don't understand very well. Do I have to create this partition myself ?
How do I decrease my disk inodes usage?
View 6 Replies View RelatedGood day All
the Disk /dev/sda5 (/var) 96 % Full
What I do
i Have 2 vps From Swvps and HostForWeb
When Finish Transfer Old VPS( HostForWeb ) To New VPS (Swvps.com) and See Disk Usage
Swvps=> 13 gig Usage
HostForWeb=> 23 gig space!
I've got a server in a local colo facility. both the facility and my server are slowly falling apart. Rather than investing in hardware and then shipping it to some location and hoping it doesn't break, I've decided to investigate VPS.
What I am finding is puzzling me. Why do providers charge so much for disk space? My current old p3-733 has a 30gb drive, I could deal with about 15gb but with some 'flex' room (i.e. a virtual drive for uncompressing files or some such). It's a personal server for me and a couple of friends, it doesn't get much traffic, I don't need a heck of a lot of bandwidth, nor anything flashy, just Ubuntu 8.04. I see places offering plenty of traffic for a decent price, yet little in the way of storage. I just don't get it.
A year ago I was here wanting to trade my class C for a dedicated server. I realize now that it would be pretty difficult for providers to do this, because if I wanted to yank my class c they'd have to renumber. But if anyone is still interested, let me know.
I've decided I want cPanel installed on my iWeb dedicated box. They informed me it will require a reinstall. Before they do this I wanted to image the disk and download the image to my PC. Is this possible to do via SSH? I'd prefer an open-source free solution.
View 11 Replies View RelatedI have a site with a lot of data (almost 20-30gigs). I want to pkgacct the site to transfer to another server but the harddisk gets full and the pkgacct stops working.
Which files and folders can I delete on the server without touching critical CPanel files? I want to delete as many as folders so that I can have enough space for the packaging process.
i having an issue with FreeBSD...
I have a Raid5 setup and working fine, I just put 2 new 18gig drives for raid1.
Now i see in dmesg this.
amrd0: <LSILogic MegaRAID logical drive> on amr0
amrd0: 104193MB (213387264 sectors) RAID 5 (optimal)
amrd1: <LSILogic MegaRAID logical drive> on amr0
amrd1: 17365MB (35563520 sectors) RAID 1 (optimal)
In bold is the 'new' array.
in fdisk i get....
fdisk /dev/amrd1
******* Working on device /dev/amrd1 *******
parameters extracted from in-core disklabel are:
cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=2213 heads=255 sectors/track=63 (16065 blks/cyl)
fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 35551782 (17359 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 164/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
I get write errors when i use sysinstall. As for the raid status. Its fine.
Logical Drive : 1( Adapter: 0 ): Status: OPTIMAL
---------------------------------------------------
SpanDepth :01 RaidLevel: 1 RdAhead : Adaptive Cache: CachedIo
StripSz :064KB Stripes : 2 WrPolicy: WriteThru
Logical Drive 1 : SpanLevel_0 Disks
Chnl Target StartBlock Blocks Physical Target Status
---- ------ ---------- ------ ----------------------
0 00 0x00000000 0x021ea800 ONLINE
0 03 0x00000000 0x021ea800 ONLINE
One of the things people seem to bring up a lot is disk IO Performance.
Why? Because theres little you can do about a customer being stupid and creating a disk swap nightmare.
There is however something you can do to reduce the impact across your clients, Have a separate raid array for swap space.
This does 2 things, it splits some of the Disk IO across 2 arrays, but more important it reduces the affect someone overusing there swap will have on the ones that are not.
Just my quick 10 cents for the day.