The max number of devices in one device server

Hi, tangoer

How many devices can created in one device server, what is the limitation for this?

I test this with TangoTest/test server on CentOS7 + Tango-9.2.5, i firstly create 1000 TangoTest device in TangoTest/test server, but when i start server, after wait about 4 minutes, it fail.


[ica@localhost ~]$ TangoTest test
Killed

my create and delete devices code:

import sys
import tango

if len(sys.argv) != 2 or sys.argv[1] not in ['c','C','d','D']:
	print("Usage: python device.py c|d")
	print("c for create devices, d for delete devices created before")
	sys.exit(0)

db = tango.Database()

dev_info = tango.DbDevInfo()
dev_info.server = "TangoTest/test"
dev_info._class = "TangoTest"

DevNums = 1000

if sys.argv[1] in ['c','C']:
	# TangoTest/test server had registered
	# so add device directly
	for i in range(DevNums):
	  dev_info.name = "sys/tg_test/%d" % (i+1000)
	  db.add_device(dev_info)
	print("Creating device successfully!")

if sys.argv[1] in ['d','D']:
	# delete all added device
	for i in range(DevNums):
	  db.delete_device("sys/tg_test/%d" % (i+1000))
	print("Delete device successfully!")
Edited 6 years ago
Hi Jimmy,

I am not aware of a limitation on the number of devices in the code. But I might be wrong.

The main limitation you might encounter and which I think is the case for TangoTest is memory + cpu on your machine which will depend on your device class. The TangoTest class is particularly heavy in memory and CPU use because it has a lot of simulated commands and attributes and is doing a lot in background threads.

I suggest you try with a simple class to find the limit or the real class you plan to use.

Cheers

Andy
Hi Andy,

Thanks a lot, as your suggestion i test my "simple" device: created 3000 devices in one server, it's ok , so main limitation is host's RAM and CPU resources.
 
Register or login to create to post a reply.