Skip to Content
-1

HANA Thread & Sample Thread : Help me to understand !

Feb 17 at 09:27 AM

156

avatar image
Former Member

Hello,

As a SAP HANA beginner, I have few questions regarding Threads & Sample Threads.

I have read the SAP Note "2114710 - FAQ: SAP HANA Threads and Thread Samples, HA200, SAP Administration Guide & Troubleshooting and Performance Analysis Guide
but I still don't understand what a thread and thread sample is.

Thread samples are regular samples of thread activities which are historicized.

Q1. What does that mean ? Could you define exactly what is a thread and what is a thread samples ?

What I understood : Threads are an Unix feature that lets application logic be separated into several concurrent execution paths. This feature is useful when complex applications have many tasks that can be performed at the same time.

When Unix executes an instance of HANA, it creates a unit called a process (at OS level) to manage the instance. All HANA processing takes place in Index Server. (it is one process at OS level)

The process has a thread of execution. This is the series of programming instructions performed by SAP HANA.

Q2. If they are so many thread in SAP HANA. What are the associated processes ?
Can I see it with ps -ef at OS level ?

On my SAP HANA System, I have seen the following tables but I don't understand the difference between each of them.

SYS.M_SERVICE_THREADS
SYS.M_SERVICE_THREAD_SAMPLES
_SYS_STATISTICS.HOST_SERVICE_THREAD_SAMPLES
_SYS_STATISTICS.HOST_SERVICE_THREAD_SAMPLES_STATEMENTS

Q3. Could you explain the goal of these 4 tables ?

I have read that SYS.M_SERVICE_THREAD_SAMPLES has a very short retention 2 hours contrary to _SYS_STATISTICS.HOST_SERVICE_THREAD_SAMPLES (42 days according SAP Best Practices) but i'm not sure if it is the only difference.

Q4. What the difference between M_* tables and HOST_* tables ?

I'm not sure to understand the link between executing the query "SELECT * FROM M_LICENSE" and the thread.

Q5. Can I see how much memory & CPU is consumming this query into one of these 4 tables ?

Q6. How can I proceed to find the correct the Statement ID ?

Q7. Where can I find more information about Thread Type ? In the SAP Note 2114710, they are 88 different type but the associated SAP Note doesn't give any help to understand them.


Thank you for your answer !

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Candy Zhan
Jun 13 at 10:08 AM
0

For Q1,3,4, you can find answers from link:

https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.03/en-US



Q2: No, you can find threads information from HANA studio.

Q5:No


Q6: check the sql plan cache, either the system view or from hana studio


Best regards,

Candy

Share
10 |10000 characters needed characters left characters exceeded