Calculating Memory for Custom Java UDXs

<< Click to Display Table of Contents >>

Navigation:  Integrating SQLstream Blaze with Other Systems > Transforming Data in s-Server > Writing a UDX >

Calculating Memory for Custom Java UDXs

Previous pageReturn to chapter overviewNext page

Depending on whether your UDX maintains memory-intensive structures, you may need to increase the Java heap allocation for s-Server when you implement your custom UDX. If your UDX requires anything more than 128M, you will need to adjust the heap size for the Java implementation of s-Server.

Note: Basic operations will not require significant memory, nor will any of the built-in plugins for s-Server.

If your Java-based-UDX holds columns in memory, you will need to increase the heap allocation by the amount needed to hold these columns:

Maximum number of rows saved in memory * (total size of row + size of any char rows)*the minimum window size

For example, if you save 100,000 rows in memory, and the total row size is 50 bytes, and the maximum window you maintain is an hour, you will need to increase the heap allocation by 10.7G

32 bytes * 100000 rows * 3600 = 18000000000 bytes = 10.7 G

To do so:

1.Edit the file defineAspenRuntime.sh to alter heap allocation. This file is where heap parameter is set.
2.Edit the line -Xmx1536m. For example, to change the heap parameter to 4G, you would change this number to 4096m.
3.Restart s-Server by typing !quit into the SQLstream s-Server terminal window and starting the server again.