Operating System - HP-UX
1745831 Members
4185 Online
108723 Solutions
New Discussion юеВ

Sybase Async I/O driver question

 
Trojan36
Frequent Advisor

Sybase Async I/O driver question

I current have a rx4640 server with 24GB of Ram, 11.23 and are using Sybase 15.0.2. The problem I have is that when I start the ASE with 18GB of Ram, the Async I/O driver would fail to start. Get get an error like resource temp. unavailable. I had to lower the memory to 16GB before the Async I/O driver would start. My question is, how much memory does the Async I/O driver needs to start? Else, how can I get around this problem. Thx in advance.
4 REPLIES 4
kenj_2
Advisor

Re: Sybase Async I/O driver question

The async driver only needs a small amount of memory for each process that uses it. However the async driver does need to lock the shared memory segment it will be doing IO from/to so perhaps your problem has to do with available swap space.

Ken Johnson
TY 007
Honored Contributor

Re: Sybase Async I/O driver question

Hello Trojan,

Look into the following OS Kernel Parameters Tuning:
- aio_listio_max
- aio_max_ops
- aio_physmem_pct
- aio_prio_delta_max
- max_async_ports

Thanks
Don Morris_1
Honored Contributor

Re: Sybase Async I/O driver question

Presumably it isn't really out of memory but (yes, as cited above) you're exhausting lockable memory.

To control that, there's two knobs.

The first is the unlockable_mem tunable (man 5 unlockable_mem). It sets the amount of memory the kernel will not allow to be locked [so that there's something vhand can work with if the system gets fully loaded]. By default it is 0 which just means it is auto-tuned by the kernel. This is normally not 1/4th of the box -- so I'm betting you're running with the default.

More arcane is that swapmem_on (man 5 swapmem_on) actually also affects lockable memory on releases before 11i v3 [such as yours]. If pseudo-swap is enabled, the kernel gives vhand extra room to work with by capping lockable memory to be no more than the pseudo-swap. Since pseudo-swap is somewhere between 1/8th of the box to 1/4th [the value depends on early boot memory consumption by the kernel], that's much more likely the case you're hitting.

If you've got enough swap space to cover your virtual allocations, you can set swapmem_on to 0, disable pseudo-swap and get additional lockable memory. (There's a Memory Class initialization message on the console/syslog when the system starts that tells you User Memory Free, Lockable and Memory Swap you can check for comparison). That will likely enable you to get your 18Gb locked -- but you may hit swap reservation failure first. Check swapinfo -atm output (look at your total used -- reserved and memory swap are most important here). If reserve+memory swap is less than your device space when you're running your workload now (presumably the 16Gb workload... so add the other 2Gb in as your needs as well, and I'd probably add a fudge factor for things you don't know about) you should be okay. If not, you'll need to add more swap before you can do this.
Trojan36
Frequent Advisor

Re: Sybase Async I/O driver question

So I would like to provide a bit more details and hopefully the expert out there can provide some suggestions or insight on how I can resolve this.

This is a 4 step application.

Step 1: Creates several tables in tempdb database for use in next steps. This process ran for 15+ hours on ASE 12.0, now runs about 3 hours on 15.0.1 these queries select/join data from tables with 200+million to 750+million rows.....:-0

Step 2: Based on results from queries run against the temp tables created in Step 1, several files are created on the same host that is running ASE.

This process runs for hours (6 -8), it actually loops through select statements based on external input. Once a file on the OS is created, the next step starts and runs in parallel with this step.

Step 3: Application takes the file created from above step and builds a report based on data in ASE, when complete tables in ASE are updated and the files on the OS are deleted. This will run for hours as well, not sure of the entire process time.

Obviously steps 2 and 3 will run in parallel for some time. When Step 2 completes they are able to measure the process status by counting the number of files on the OS that are left to process.
During the first few hours after step 2 finishes we can see that the files are being deleted at a rate of between 30k - 40k per hour. We consistently see these numbers drop through the 20k-30k per hour, all the way down to about 6k - 8k deletions per hour after about 6 hours until the process completes. Yesterday we were able to kill step 3, and restart just ASE then continue with step 3 but still see the same 6k - 8k deletions per hour. The same is seen if we also restart both the OS and ASE. Are there any suggestions on how I can tune either Sybase or HP-UX v2 to keep the deletion rate at or near 30k-40k per hours?

thx in advance.