发布新帖

查找

讨论 (2)0
登录或注册以继续
文章
· 二月 13, 2022 阅读大约需 2 分钟

IRISが使用するワーキングセット(メモリ)について

これは、InterSystems FAQサイトの記事です。

各プロセスが消費しているメモリの内容は、Windowsリソースモニタの項目のワーキングセット、共有可能、プライベートで確認できます。

これらの内容は以下になります。

ワーキングセット プロセスが使用する物理メモリです。
         ワーキングセット(プライベート)とワーキングセット(共有可能)との合計です。 

共有可能               プロセスが使用する物理メモリ内で他のプロセスと共有可能なメモリです。

プライベート       プロセスが使用する物理メモリ内で他のプロセスと共有不可能なメモリです。


例えば、以下のようにメモリを使用しているプロセスがある場合、ほとんどは共有メモリになっているといえます。

ワーキングセット 5,341,472 = 共有可能 5,328,664 + プライベート12,808 (kb)


プロセスがアクセスする共有メモリは、データベースキャッシュおよびルーチンキャッシュで使用されているメモリ領域になります。

プロセスが大量にグローバルへのアクセスを行うと、データベースキャッシュへのアクセス量も多くなり、メモリ使用量の共有可能の数値が大きくなります。
(最大でデータベースキャッシュサイズまで大きくなります)

各プロセスのメモリ使用量のワーキングセットが多くても共有可能の数値が多い場合は特に問題はありません。

共有メモリ領域にマップしてる為にワーキングセットの数値が大きくなっているだけで、別途メモリを使用している状況ではありません。


WRTDMN や GARCOL などのシステムコアプロセスのワーキングセット(メモリ)が肥大化している場合、いずれのプロセスもデータベースキャッシュを大量にアクセスするため、データベースキャッシュのサイズが程度までの数値であれば妥当な値となります。


コアプロセスについては、以下のドキュメントをご覧ください。
 コアプロセスについて


あわせて、以下の関連記事も是非ご覧ください。
 InterSystems製品のプロセスが使用するメモリ量について
 管理ポータルのメモリ関連設定項目について
 System routine buffer (# KB) shortage is detected.... のメッセージの意味と対処方法
 データベースキャッシュおよびルーチンキャッシュの最適値の設定方法
 Windows上での共有メモリの割り当てについて
 

讨论 (0)0
登录或注册以继续
文章
· 二月 9, 2022 阅读大约需 2 分钟

GlobalToJSON-embeddedPython-pure#2

This package was triggered by the extra bonus points in the contest for writing the example
in embedded Python only.  Therefore PURE

Based on the previous example it looked like being a simple task. A mistake!
I met a bunch of issues that I had to workaround.
But I have to admit that there might be ready solutions and I just didn't find them.

  1.  The first step was to reduce the class to 2 methods [language = python] only
    • generating the JSON object file
    • loading the JSON object file
  2. Within the import iris.gref class I was unable to find an equivalent to $DATA()
    • checked with order() method for subscripts  to add 10 to my _d
    • tried with get() to access a value and add to my _d 1 for success
    • so my values were 0, 1, 10, 11   as I'm used to  
  3. To scan the global nodes I used method query()  that didn't just return the next node but ALL nodes.
    • Even theoretical nodes. Referring to my model 
    • I expected to see ^X,^X(1),^X(1,2),^X(1,2,0) ,^X(1,2,1),^X(1,2,2),^X(2), ... and NEVER ever ^X(1,2),
    • Value returned None for this unexpected Zombie. But None could also signal Nullstring.
  4. This worked for rather large Globals, but I had my doubts about size and available memory.
    • A test with ^oddDEF (1410829 nodes) ran with no result and no error. So be careful.
    • In addition, access to PPG, and extended references ( ^|"USER"^|global) ar not supported  
  5. The next challenge was handling of $LISTBUILD() 
    • I found no trace of $LISTVALID() equivalent or any access to elements with $LIST()
    • so $LIST() constructs are just seen and handled as binary strings.
    • You see this in the rather unreadable val elements of the generated JSON object.
    • Though it has the advantage that it can be stored as a simple string during the load operation. 

Summary:

  • The attempt to use and implement everything  just using embedded Python is a mistake
  • Keep access to the core structures of IRIS as a subject for ObjectScript which is grown with it
  • But instead, use  the range of Python libraries for those areas that are not covered by IRIS yet 
  • The success will lay in a well-balanced mix of both worlds
  • It's no surprise that version 1 of embedded Python has limits that were not mentioned yet anywhere
  • But it is the power of this community to  learn from each other about such limits  

Video

讨论 (0)1
登录或注册以继续
文章
· 二月 9, 2022 阅读大约需 2 分钟

GlobalToJSON-embeddedPython#2

I will give you some additional information on my first embedded Python package.
it is written as a mix of python and ObjectScript to take the best of both worlds.

  1. The target was to create an easy-to-read and easy-to-understand JSON file that also allows editing the contents within some limits with an external editor.  
  2. The result should be independent of 3.4 MB limit of strings in IRIS. So the result should go to a %Stream. Which is in case of Python an external file.  
  3. Also, the processing should be easy to follow and avoid tricky libraries.  
  4. And most imported I wanted to show the interaction between methods written in  ObjectScript and methods written using embedded Python inside a common class.  

So my choice was to keep all code close to Global access in ObjectScript

  • Checking global existence with $DATA()
  • Running along the Global nodes with $QUERY()
  • Converting %LISTBUILD() items into a readable format
  • Converting and storing $LISTBULD() content dorug load

So left to Python were these tasks

  • Creating the result file
  • Packing node reference and content into a JSON Object
  • Reading and checking the input file during global load
  • Unpacking the JSON objects
  • Writing the global nodes for 'simple contents as strings and numbers
  • Initiating write of $LISTBUILD() content in Objectscript.

So there is a lot of interactions initiated from both sides.
This was the major purpose of this exercise.  

Of course, you may argue that all this  could have been done just by using
ObjectScript. And this is correct, but not the purpose.

Video

讨论 (0)1
登录或注册以继续
文章
· 二月 8, 2022 阅读大约需 1 分钟

GlobalToJSON-embeddedPython-pure

I have created a package to export a Global into JSON object file and to re-create it by reloading from this file   
embeddedPython refers to the new available technologies. It should be understood as a learning exercise of 
how to handle the language interfaces. Only Global nodes containing data are presented in the generated JSON file.
Differently from the previous example, this one is using embedded Python only, no ObjectScript. Therefore PURE

We export this Global 

This is the file content

gbl.json.jpg

And the related Loader creates exactly the same Global

Video

2 Comments
讨论 (2)1
登录或注册以继续