Link to home
Start Free TrialLog in
Avatar of jackdaniel_china
jackdaniel_china

asked on

Slow Dump

Hi Guys
I have a sybase server version 15.5 that is running on linux redhat 5
I am running a dump to a local file that is really slow.

it takes around 1 hour to dump 40G

below is my server start cfg.
source /opt/sybase/SYBASE.sh
export LD_POINTER_GUARD=0
ulimit -s unlimited
/opt/sybase/ASE-15_0/bin/backupserver \
-e/opt/sybase/ASE-15_0/install/SYB_BS.log \
-N25 \
-C20 \
-D32 \
-M/opt/sybase/ASE-15_0/bin/sybmultbuf \
-SSYB_BS \

dump command:
dump database Db1 to '/backup/devices/sybase/bkpfiles/Db1.dump'

I am not using compression and stripes at this moment.
any tip/suggestion to improve it?

I did a benchmark test in the HD and it's average to write is around 400Mbps with all services running.

I am running Nagios and processor has no queues. (8 cores) this is during peak hours.
load average: 3.97, 4.37, 4.18

the dump process is using little shared memory as below
0x00000000 465240071  root      600        2048       2

not sure if changing the maximum -m parameter will do any good.

thanks
Avatar of alpmoon
alpmoon
Flag of Australia image

The first option you can try is striping:

dump database Db1 to '/backup/devices/sybase/bkpfiles/Db1_S01.dump'
stripe on '/backup/devices/sybase/bkpfiles/Db1_S02.dump'
....

....
stripe on '/backup/devices/sybase/bkpfiles/Db1_S08.dump'

I guess 8 stripe would be optimal for 40 GB, you can try more like 12 or 16 as well.

You will have more sybmultbuf processes and dump files which means utilizing more disk IO capacity. It will be more CPU intensive though.
Avatar of jackdaniel_china
jackdaniel_china

ASKER

Hi Alpmoon
thanks for your suggestion

I am using an small database to test. It's dump size is 1.6G
adding the stripe option did not improve the total dump time but in 1 or 2 seconds.

it gives me a speed of 21Mbytes per second for the sybase dump, while the hard disk tests give me around 400Mbytes per second.
I tried to increase the block size, id did not had any difference as well.

While I add stripe to the dump, should I change the -P option to the same number of stripes?
I can see that the process even having a lot of available memory only gets around 30Mbytes from the share memory. Is there a way I can force the process to get more memory?

thanks
I am not sure about the default value for -P option. Most probably default value is OK as long as you are not performing multiple striped dumps at the same time.

You may not get much benefit from a striped backup for such a small database because there is an overhead. You should try it with a big database. Each sybmultbuf process uses additional memory for itself. So using more stripes means using more memory.

If a striped backup takes the same time with a non-striped one, I think you should check OS configuration.
the default of -P is 48 as I checked.
I tested just now with 4 stripes and I got 36 minutes to dump 40G, a little gain.
but at the same time, the cpu utilization started to degraded. I got the load average from 3 to 16 (8 cores).
what call my attention is that the backup gets only 10Mbytes of memory to each process. Even with a lot of free memory.

For the OS I follow all recommendations. the database is running fine in raw devices, separated from OS, etc...etc....is there any special recommendation?

Ps: I did try to add compression and it make it works as without it.


I will have IBM support guys coming this weekend to check the server firmware/etc...
ASKER CERTIFIED SOLUTION
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think you expect a backup speed like a file copy. You are dumping an online database updated by users. Backupserver needs to check updates performed during the backup process and then complete backup by adding latest updates at the end. It cannot be completed in a few minutes for a 40 GB database.

I think you should try more stripes if CPU load is OK. I agree with Joe that you shouldn't exceed number of real cores if you use compression. But you can exceed number of cores if you are not using compression. It would reduce dump time. You can compress dump files later if you want to keep them compressed. However, you shouldn't limit yourself with number of cores if dumping time is critical for you.

Joe asked a lot of important questions as well. They may help too.
Hi alpmoon, it's true that even on my 4-core laptop I can show 5 stripes are faster than 4. I don't get linear scaling but every little bit helps.

So yes, agree going beyond number of real cores can still be of benefit. With the new compression scheme 100 that still seems to be true, just less so.

Certainly don't go configure for 40 stripes on an 8 core box though. :)
Hi Guys
thanks a lot for your feedback.

I have been doing changes and test with all options you have pointed out.
I have 2 physical processors with 8 cores.

IBM will bring 2 new processors so I will have 4 physical processors with 16 cores for next week.
I have redhat Linux version 2.6.18-53.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14))

I am using the same disk as the ASE as this server has only one controller with raid 10
Sybase device is in RAW devices!
I manage to add a isci device to it and dump to this device with some the parameters you are suggesting. It drops the dump time from 40 minutes to 14. Using stripe of 4.

kernel.exec-shield is disabled!
MLOCK permission I am not sure how to check it...

For -m, I do have free RAM available and I set to 4G -m4096 but it seems that each process only use 10M when using stripes. If no stripe the maximum it allocates was 60M... not sure why and how it handle it.

I will wait until tomorrow when we will shutdown the server to add hardware, update BIOS, etc... and remake all tests
thanks guys, will keep you posted.
Daniel
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot Joe!
To keep you posted... the parts did not arrived last Sunday as expected.
IBM is delivering the parts (processors and memory and RAID card battery) today and I will have the next maintenance window at this coming Sunday.
Thanks a lot!
I forgot to mention that the glibc is correct! glibc-2.5-18
Hi Joe,
I checked the MLOCK and it is not set in the linux.
If I change it now will it make any difference as you mention that it must be done before installing ASE?
thanks
It's a performance option, can be set any time, Sybase just wants it set correctly. :) No harm in setting it now, but restart ASE & BS when you do. (ie. wait for an outage - maybe when new h/w goes in?)
I will do it this coming Sunday when I have a scheduled maintenance to install the new parts!
thanks again!
I'll keep you posted as soon as I have any news!
I think this question shouldn't be deleted. There are a lot of useful information and discussion. You can give points to Joe or divide them to Joe and alpmoon
I think this question shouldn't be deleted. There are a lot of useful information and discussion. You can give points to Joe or divide them to Joe and alpmoon