Cognos亲和力解释

从我刚接触Cognos就有一个名词一直弄不明白“亲和力”什么是亲和力?我曾经问过Cognos技术支持 ,他也没有个我很明确的答复,下面的内容是我根据一个文档翻译来的,肯定有很多地方时不到位的,希望各位多多指教。


亲和力连接
  亲和力连接用来请求,它是报表服务进程(BIBusTKServerMain)一部分(可以理解为线程)。亲和力根据一个请求是否分配给特定的服务还是分布式环境中可以分配给另外一个服务。亲和力在请求和服务之间,它负责确保请求会被传递到合适的服务器上去执行。亲和力请求类型分为三种:绝对亲和力、高亲和力、低亲和力。
建议:
  不要尝试去修改亲和力连接数,除非你对这些参数非常理解,因为这些设置对Cognos的稳定性有很大影响。如果你对某个参数由怀疑请联系Cognos技术支持。
默认情况下ReportService亲和力连接数的设置能够满足大多数Cognos BI应用程序类型(高=1、低=4)。每个报表进程的最大亲和力连接数不要超过5(包括低亲和力和高亲和力)。
注意:请求期间会为请求分配一个亲和力连接(从请求提交到请求结束)。 

绝对亲和力请求
  每个报表进程中除了高亲和力请求和低亲和力请求,还有绝对亲和力请求。绝对亲和力请求只能在特定的报表服务上执行,不管是否有负载均衡。取消报表操作是最好的例子,只有在运行报表的服务上才能取消它。
绝对亲和力请求就像他的名字-绝对存在(By its very nature, absolute affinity requests are just that – absolute),因此针对此类请求的参数没有包含在ReportNet参数中以免冗余。
绝对亲和力请求负责为客户端和服务器创建关联,以确保长时间运行的报表不会超时。绝对亲和力请求在下面的操作中会用到:等待、获取输出、释放。
例子:当用户取消一个正在运行的报表时,绝对亲和力连接负责将取消请求传递给运行报表所在进程。 

低亲和力请求
低亲和力请求在任意报表进程中都能以同样的效率完全执行。低亲和力请求是独立的,在系统处理过程中与其他请求没有任何关联。低亲和力请求包括PDF、HTML报表的第一页。
报表:报表查询、报表处理
报表认证:元数据检索、查询验证
管理:测试数据源、添加对象(文件夹、job、计划任务等等)、请求门户页面
例1:当用户请求HTML报表时,任意可用的报表进程都可以处理输出第一页,进程会使用一个低亲和力连接来处理数据。如果处理这张报表的进程还可用那么从这张报表跳转到的其他页面都用高亲和力连接来处理,否则将用另外进程的低亲和力来处理。
例2:当用户请求PDF格式报表时,任意可用的报表进程都可以处理该报表,进程会使用一个低亲和力连接来处理整个PDF格式的报表 

 
高亲和力请求
高亲和力请求可以在任意报表进程上执行,但能在特定进程上高效执行,在交互式报表中执行下一页操作就是该类请求最好的例子。若请求报表进程还可用,直接移动数据库游标,获取数据然后展现页面。也就是说,当报表的第一页展现完成,信息会被缓存在报表进程中,以避免接下来的高亲和力请求产生过多报表动作。这些报表动作包括预处理SQL、分析报表定义等等。这些信息从报表进程缓存的信息中获取。
由于没有可分配的高亲和力连接或者管理员关闭计算机或者网络错误若导致当时的进程不可用了,那么请求会被转向到别的可用进程去执行。请求的页面还是会展现,只是时间会略长。
注意:ReportNet对高亲和力连接请求不做负载均衡
一下请求均为高亲和力请求:
Report Viewer中的连接: 运行, 返回
HTML报表页面导航: 顶部、向上翻页、向下翻页、底部
发送选项:保存、另存为、打印、Email、另存为报表视图
例1:当用户请求HTML报表时,会调用或启动一个BiBusTKserverMain进程,该进程会使用低亲和力连接处理展现的第一页,当用户点击向下翻页或者底部链接是,该进程会使用高亲和力连接来处理接下来的所有展现页面。实际上高亲和力连接会处理除去第一页以外的所有页面。

下面附上英文的原文

what is an Affinity Connection?
 
An affinity connection is used for request assignment purposes and is an internal working part of a CRN report process (BIBusTKServerMain).   Affinity refers to whether a request is assigned to a specific server or, a load-balancing mechanism can assign it to another server. Affinity between request and server ensures that requests are routed to an appropriate computer for execution. There are three types of affinity: absolute, high, and low.   For more information
on affinity connection types, please refer to sections 3.1, 3.2 and 3.3.
RECOMMENDATIONS:   
DO NOT attempt to change the affinity connection settings unless you thoroughly understand them because they can severely impact Cognos stability and/or performance on the system.  If in doubt, contact Cognos Customer Support
The default settings for Report Service affinity connections are usually adequate to handle most types of Cognos BI applications (High = 1, Low = 4).  
The maximum number of total affinity connections per report process should NOT exceed 5 (i.e. sum of Low and High affinity connections)
NOTE: A request will be assigned to an affinity connection for the duration of the request (i.e. from request submission to request completion)

Absolute Affinity
In addition to low and high affinity connections per report process, there are also absolute affinity requests. These are requests that can only be executed by a specific report server, regardless of the load balancing used. The cancel report execution is a great example of this, you can only cancel a report on the server running it.  
By its very nature, absolute affinity requests are just that – absolute, therefore tuning parameters for this type of request are not exposed in ReportNet to avoid redundancy.
Absolute affinity is used to create an association between the client and the executing server to ensure that long-running requests do not time out. An absolute affinity request is used with the following operations: wait, getOutput, and release.
Example: When a user cancels a running report, absolute affinity routes the cancel request back to the originating report process used to execute the report. 

Low Affinity
 
A low affinity request is one that can be completed with the same efficiency by any report process.  Low affinity requests are considered independent without any relationship to other requests that were processed by the system.  On-demand reports which includes PDF, and the first page of an HTML report are good examples of low affinity requests. 
Reporting: Report querying, Report processing
Report Authoring: Metadata retrieval, Query Validation  
Administrative: Testing data source connections, Adding objects (folders, jobs, schedules, etc.), Refreshing portal page 
Example 1:  When a user runs an HTML report, any available report process (BIBusTKServerMain) can be used to render the first page. The process will use a low affinity connection for request assignment purposes. All other pages for that report will be assigned to a high affinity onnection of the same report process if available.  Otherwise if the high affinity connection of the same report process is not available it will relegate processing to a Low affinity connection.
Example 2:  When a user runs a PDF report, any available report process (BiBusTKServerMain) can be used to render the report. The process will use a low affinity connection for request ssignment purposes to render the entire PDF report.

 
High Affinity
A high affinity requests is one that can be executed on any report process but would be most efficiently executed on a specific report process - page down on an interactive report is a great example of this.  If the same report process is used, we scroll the existing database cursor, retrieve the data, and render the page. 
In other words when the first page is rendered, information is cached by the report process so that subsequent High affinity requests can avoid overhead activities.
These activities include, preparing the SQL, parsing report specification needed to build the layout, etc.
This is accessed from cached information (i.e. report process memory).  
If that process is not available, because all high affinity connections are assigned or the administrator shut down the computer or there was a network failure, the request is routed to another available report process for execution. The next page can still be served up, although execution will be slower.
NOTE: ReportNet routes high affinity requests to a specific server regardless of the load balancing used.  .
Report Viewer links: Run again, Return
HTML Report Navigation: Top page, Page up Page down Bottom page
Delivery Options: Save, Save As, Print, Email, Viewing
Example:  When a user runs an HTML report, a BiBusTKserverMain process is spawned. That process will use a Low affinity connection to render the first page. When the user clicks on Page Down or Bottom, the High affinity connection will render all other pages (next pages and last). In other words the High affinity connection will render all pages except the First.

原文地址:https://www.cnblogs.com/interboy/p/1630886.html