on 2014 Jun 12 9:43 PM
Hello experts,
just wondering if somebody already reviewed thoroughly latest guide for best practices on SAP Sybase ASE?
I am talking about the document from note 1680803 - SYB: Migration to SAP Adaptive Server Enterprise - Best Practice (former note 1722359 - SYB: Running SAP applications on SAP ASE - Best Practice).
The guide for normal runtime operation was merged with the guide for migration, but there are some contradictory statements.
Apart from that the study case is again designed for server with huge memory and lot of CPU cores (so not so real case normally, I wonder who setup so often such huge servers...), I have found some inconsistencies.
E.g. in part "Reconfigure Engines and Parallel Processing", they talk about to limit ASE engines to 16, but the command configures 32.
alter thread pool syb_default_pool with thread count = 32, idle timeout = 2000
No change to the previous setup for migration. Is this just typo? I understand it should be 16, and then also number of network tasks for normal operation would be 4 (as mentioned in the beginning of guide that normally you set up 1 per 3-4 engnes). If this is not typo, then number of network tasks is wrong as it should be 8.
Also they introduced idle timeout, but only talking about ERP and possible lower value for Solman - does this mean that for BW you keep default value (which if I am not mistaken is 100)? As per ADM540 you should even decrease this timeout when SAP system is sharing server with database - I know that document is old, but is again contradictory, not saying that it is wrong, but not well explained.
If anybody checked new version of guide, please let me know, I think it is bit messed up and is bit difficult to distinguish what you should set up for migration case and what for normal operation case.
Thanks!
Regards,
Matus
Request clarification before answering.
Actually, quite a few customers run with that many engines/memory. In fact, it is difficult these days to even buy a server with less than 128GB of memory and 16 cores/32 threads. Pretty much the only time we see less is when the install is in a VM. Interestingly, we had comments from the first version suggesting the numbers were not realistic given the typical size of systems being deployed were much larger.... In addition, in my experience with customers on SAP systems, they were not aware of how much memory was necessary to really support medium to large systems based on the configurations they were attempting.
I am sorry that you feel some of the examples are contradictory. You are correct in pointing out that the text refers to 16 engines and the example configures 32.... So yes, for that specific example, it should have been 16.
Secondly, not having seen ADM540, but I think there is a bit of a problem if they suggest that. I my opinion (and I have spent a lifetime tuning ASE), the idle timeout for ERP and BW should likely both be 1000+ and 2000 is not unreasonable. The comment in ADM540 is likely due to if ASE and a NW CI are sharing the same cores - e.g. you have a 4 core box and ASE is running on 2 cores (we will ignore threads for this discussion) and you have 30 NW worker processes - which obviously will need to bump ASE off the cpu in order to run. This may be fine in a test/dev or even a solution manager system, but bumping ASE off the core is NOT a good thing for a production system. In fact, I would encourage using numactl or similar to fence off the the cores used for ASE from NW worker processes if at all possible. We have seen cases of overloaded NW installations with multiple CI instances with hundreds of worker processes each starving cpu away from ASE......sooo....I would tend to actually be a bit more than firm on suggesting that 100 is a very bad starting point. Given the number of client side joins that SAP uses to avoid [DBMS proprietary] temp tables, it is critical that ASE's (or any DBMS) response time be minimized as much as possible.....having ASE yield the core practically as soon as it gets done processing one task (and puts it to sleep pending an IO) just really causes things to run slow. Think of a typical query that returns 10 rows - say wide enough that each row fills 1 packet. If the packet transmit time (and client ACK) takes more than 100 microseconds on CPU (almost a given for network interactions...as clock ticks are in nanoseconds and networking is minimally milliseconds - 1000 microseconds), ASE would yield the CPU every time it sent a packet. When the client wanted the next packet, the OS would have to wake up the ASE process (an interrupted sleep) which is a nasty heavy weight operation. Hence it is best for ASE to hang out on the CPU until reasonably sure that nothing more is going to happen very soon....and on current cpus...and having it run for 1-2ms (1000-2000 microseconds) shouldn't be a hardship. If you created a separate thread pool for batch worker processes, then I could see maybe using a lower idle timeout such as 200 or 250......100 is just plain too low in my mind...it is like saying ASE is expecting an odd query every few seconds vs. a steady workload. Basically at that level, there had better be a task in the ASE job queue or one on the way on the network already, or that engine is going to sleep.
While I state that with regards to ADM540 itself, I have not seen the class (perhaps)...one customer did show me the notebook of a class (ASE Sys Admin) they went to and it was really targeted at non-SAP installations more than SAP installations - from a reality/experience aspect. Part of the issue with the class the customer showed me was it borrowed liberally from the old SY classes as a starting point, but at the point the class was developed there was not a lot of experience with running SAP installations on ASE to really point out the fine tweaking areas such as idle timeout.
However, the document was really aimed primarily at Business Suite vs. BW systems or a Solution Manager install (which are much smaller) - there are a lot of other considerations for BW the guide doesn't get into - although some of the sizing is a better start than the defaults provided by SAPINST
The former runtime guide essentially was just merged in to the Post-Migration Steps section.
May do a quick refresh in the near-future (due to some recent experiences), so if you have other specific examples of the text and SQL not aligning - please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jeff,
thank you for quick and detailed answer.
I understand you work on huge installations, but not everybody is. In my experience (several years, but I guess not so many as you), I would say that average server I work with has usually 32G RAM, not 100 or 256.. Of course, we do not discuss HANA here. But fine, depends on customers you work on, if rule for recalculation is clear, then no problem.
Thanks for confirming typo and explanation of idle timeout.
I understand that Runtime section starts from Post-Migration steps section, but imagine you want just runtime part and you didn't do migration, I can see in first part dedicated for migration that there are some parameters which you don't mention anymore in part for normal operation. So if you jump directly to Post migration section (let's say you have a fresh installation), it is very likely you don't configure these at all (so they have default values) and are not adjusted as it would be in case when you check this Post migration section after carrying out all previous configurations from migration part. E.g. min pages for parallel scan or update statistics hashing, etc. etc. I hope I am clear here.
Thank.
Regards,
Hmmm...maybe we need small, medium, large t-shirt size examples..... Funnily enough, the original was quoting 100GB and it was viewed as small by some....and considering the 32GB you cite - its whopping. Sigh. Hard to please everyone.
The problem was that the original runtime had sections on optimizing compression, etc. that got pulled out into separate SAP notes that left the runtime guide at a barebones. I have been thinking of leaving the migration guide as is, but then maybe do a new guide on optimizing and troubleshooting ASE for SAP that looks at things such as named caches, engine sizing and even query optimization as key areas for discussion. After all, if someone did the migration with any SAP notes, there should be a fairly consistent basic config (SAPINST started really enforcing this better after ASE 15.7 sp42)....so the real runtime situation is more optimizing and troubleshooting. Specific areas I was thinking of:
- Using named caches to isolate IO cache turnover
- Engine sizing
- Using engine groups/thread pools to isolate batch users
- Troubleshooting procedure cache and proc cache manager spinlock problems
- Understanding compression and impact on query processing
- Finding and troubleshooting slow queries/bad query plans
...might be a while before written, but would such a doc help you better than the old runtime guide??
Assumption would be that the reader had taken (minimally) a P&T course or at least understands what a query plan is.....fair?
Jeff, as I said, if the calculation formula is clear, there is no problem with case of 100G server.. I only say - IF..
You are talking about advanced configuration, that's not what I meant.
I just want to point out that new guide is not well structured, having typo (I know mistakes happen but in such guide can be misleading) and some explanations are missing.
You end up with two different sets of parameters:
1- the ones which you set for migration but do not reset them after in part for normal operation - so they are still active (if this is correct or not doesn't matter now)
2- the ones which you set in part for normal operation (and you do not have those parameters activated in point 1 if you didn't do migration part)
It doesn't matter what parameters configure, I am saying they are somehow forgotten. So the question is, if you follow only runtime part, should these params be also set up? (I can make a list of them, but as example already mentioned 'min pages for parallel scan', 'update statistics hashing', ..)
I understand best practice guide is just guideline, but should be clear enough for people who are not such experts in Sybase, because in the end, it's created for them.
Nevertheless that's my opinion - if new merged guide is so crystal clear for everyone then apologies.
Regards,
Hello Jeff,
seems that after 1 year we have a new guide for Best Practise.
A lot of changes, I like better separation of migration and runtime parts.
Anyway, again some points here that are questionable.
I saw the idle timout was descreased from 2000 to 250, so,perhaps you can explain why this has been changed?
Configuration parameters for BW - what are the values for parallelism based on?
I am talking about these ones:
max query parallel degree - 6
max scan parallel degree - 4
max utility parallel degree - 10
The number of engines configured in example is 16. So it means those should be any values higher than 1 but less than number of engines? It's not clear.
According the configuration guide note 1749935 the first parameter is even not supposed to be different than 1 as that is a requirement, not recommendation. It is contradictory.
Can you bring the light to the topic, please?
Thank you.
Regards,
WRT the idle timeout, too many folks were tuning ASE as if it was Oracle and simply throwing CPUs at it. As a result, the engines got into a lot of 'aggressive task stealing' - meaning trying to steal tasks from other engine local run queues as there was no work in the global run queue. Net result was a lot of spinlock contention. Trying to convince customers they really don't NEED that many engines is almost a lost battle as that is they way they ran Oracle by golly and they are gonna run anything else the same exact way. In ASE 16, we added a config parameter to disable aggressive task stealing just for those folks that have wildly swinging workloads.
Secondly, the Best Practices Guide is a starter (if you will) for SAP Applications generically. For BW, there are other SAP Notes that then refine the tuning. For example, the parallel query parameters. *HOWEVER* - before using parallel query with BW - you *REALLY* *REALLY* need to upgrade to ASE 16 sp01 pl01 or after. There is a ton of enhancements and improvements in that release aimed at BW systems specifically.
WRT parallel queries - you left out a config (or several actually) - such as 'number of worker processes'. This limits the total number of threads available for all parallel queries globally on the system. It should be set to minimally 2-3x the number of engines - so in your case somewhere between 32 and 48. The exact *best* value depends on how busy you can keep the threads, the number of concurrent other queries and overall cpu utilization. Max scan parallel degree is used for table scans and employs a leap frogging technique - so values higher than 3-4 are likely of little benefit. Max query parallel degree is used on partitioned tables - as a starting point, it is often set to some ratio less than 'number of worker processes' to keep a single user query from monopolizing the system. Yours is a bit low - but then your 'max utility parallel degree' is as well - I would expect it to be somewhere close to the number of engines. Did you by chance start with a few engines and then bump it up to 16???
Hello Jeff,
thanks for the quick answer. I think there is a little confusion, the parameters and number of engines I mentioned are coming from the new version 1.3 of Best practise guide, and according to your comments it's like you would not set up the system with such values, lol.
It is page 43 from the Best_Practices_SAP_ASE_v1.3 in note 1680803.
I am interested to do such configuration for BW with for example just 4CPU cores, meaning let's say 4 engines. And in the guide it's not clear where those values comes from, if these are based on number of engines or what should be the formula to let's say recalculate parameters. I mentioned only few of them of course there are more.
Regards,
No - you are confusing cores and engines....and you aren't clear on where you are getting the numbers. I *assumed* you were looking at your BW system. Consider the following:
max engines recommended:
Intel x86 - 1.5x number of cores (HT enabled)
IBM P series/AIX - 1 engine per SMT thread, SMT 4 or SMT 8 (do not use SMT 2)
Oracle SPARC - 1 engine per thread
However, the parallel query configs in the best practices are not for parallel query per se (although we do allow it for ERP on 15.7 sp130+) - but somewhat to allow parallel threads for index creation during migration.
But as I *said* - tuning BW system parallel query (and other aspects) is a layer of tuning ON TOP of what the Best Practices starts out as.....you need to follow the BW tuning notes for specifics. Not sure what the SAPNote numbers are off the top of my head - but I know they are out there.
There are some aspects of the Best Practices which really doesn't apply for BW - e.g. the queue cache - not sure if it would get used at all. But you might find it handy to bind frequently used dimension tables to it
User | Count |
---|---|
56 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.