InterSystems FAQ rubric

Data for InterSystems products (table row data, object instance data) is stored in global variables.
The data size of each global can be obtained by clicking the properties of the global you want to view from the Management Portal > System > Configuration > Local Database > Globals page, and then clicking the Calculate Size button on the Global Attributes page that appears.
To display the data sizes of globals in a namespace, you can call ^%GSIZE utility on the terminal.

1 1
0 72

By default, all files created inside a container are stored on a writable container layer. This means that:

  • The data doesn't persist when that container no longer exists, and it can be difficult to get the data out of the container if another process needs it.
  • A container's writable layer is tightly coupled to the host machine where the container is running. You can't easily move the data somewhere else.
  • Writing into a container's writable layer requires a storage driver to manage the filesystem. The storage driver provides a union filesystem, using the Linux kernel. This extra abstraction reduces performance as compared to using data volumes, which write directly to the host filesystem.

To demonstrate the default behavior of the docker container, let us run the container by using the following command:

docker run -d --name iris-comm -p 1972:1972 -p 52773:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community:latest
#docker run command to create and start the container
docker run 
#-d -an option used to start container in deattach mode
#name of the container
--name iris 
#-p -an option is used to map the ports
-p 1972:1972 
-p 52773:52773 
#-e -an option to set environment variable
#base image

Run the following Docker command to list the details of running containers:

docker ps

Let us connect to the iris terminal by using the following docker command:

docker exec -it iris-comm iris session iris

We will save some data to IRIS by using "DockerVolume" global

To view the value of global, navigate to the management portal (demo | demo)

To see the value, click on the 'View' option

Now, we will recreate the container to check if IRIS data persists.

In order to recreate the container, we have to stop and remove the container.

Below docker commands will stop, remove, and recreate the container.

# Stop the container
docker stop iris-comm

# Remove the container
docker rm iris-comm

# Create the container
docker run -d --name iris-comm -p 1972:1972 -p 52773:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community:latest

"Let us connect to the IRIS terminal and check the value of the global which we saved earlier

Our data is not available once we recreated the container.

3 0
2 43