C.6 SMS Gateway Server Storage Requirements
To determine the amount of resources you will need for the SMS Gateway
Server, use the numbers you generate from the requirements in Table C–27 along with your expected number
of relayed messages per second and the RECORD_LIFETIME setting.
Table C–27 covers the requirements
for the historical records, the SMPP relay, and SMPP server.
Table C–27 SMS Gateway Server Storage
Requirements
Component
|
Requirements
|
In-memory historical record
|
Each relayed message requires 33+m+s bytes
of virtual memory, where m is the length of the message’s
SMS message ID (1 <= m <= 64) and s is
the length of the message’s SMS source address (1 <= s<=
20).
When MAKE_SOURCE_ADDRESS_UNIQUE=0, then only 16+m bytes are used. For 64 bit operating systems, 49+m+s bytes of virtual memory are consumed per record [24+m when MAKE_SOURCE_ADDRESS_UNIQUE=0].
Note also, that the heap allocator may actually allocate larger size
pieces of virtual memory for each record.
The maximum number of records is 43 billion (2**32-1). For less than
16.8 million records (2**24), the hash table consumes approximately 16 Mb;
for less than 67.1 million records (2**26), the hash table consumes approximately
64 Mb; for more than 67.1 million records, the hash table consumes approximately
256 Mb.
Double the memory consumptions for 64 bit operating systems.
These consumptions are in addition to the memory consumption required
for each record itself.
|
On-disk historical record
|
Each relayed message requires on average the following number of bytes:
81+m+2s+3a+S+2i
where:
-
m is the average length of SMS message
IDs, and 1<=m<=64
-
s is the average length of SMS source addresses,
and 1 <= s <= 20
-
a is the average length of email addresses,
and 3 <= a <= 129
-
S is the average length of Subject: header
lines, and 0 <= S<= 80
-
i is the average length of email message
envelope IDs, and 0 <= i <= 129
The size
for any specific record is influenced by the length of the message’s
envelope From: and To: addresses, envelope
and message IDs, and the length of the Subject: header
line.
The maximum record length is 910 bytes.
When MAKE_SOURCE_ADDRESS_UNIQUE=0 is used, the size of each record in
bytes is:78+m+3a+S+2i.
|
SMPP relay
|
Each relayed SMPP session consumes two TCP sockets: one with the local
SMPP client and another with the remote SMPP server. Approximately 1 Kb of
virtual memory is consumed per connection on 32 bit operating systems; 2 Kb
on 64 bit operating systems.
|
SMPP server
|
Each incoming connection consumes a TCP socket. Approximately 1 Kb of
virtual memory is consumed per connection on 32 bit operating systems; 2 Kb
on 64 bit operating systems.
|
For instance, if on average 50 messages per second are expected to be
relayed, SMS source addresses are 13 bytes long, SMS message IDs have a typical
length of 12 bytes, email addresses 24 bytes, Subject: lines
40 bytes, email message and envelope IDs 40 bytes each, and historical data
is retained for 7 days, then:
-
There will be 30.24 million historical records to store, each
on average 58 bytes in memory and 311 bytes long on disk;
-
The in-memory consumption of the historical records will be
about 1.70 Gb (1.63 Gb + 64 Mb); and
-
The on-disk storage will be approximately 8.76 Gb.
While a sufficiency of disk may be supplied to handle any on disk requirements,
the virtual memory requirement on a 32-bit machine will be a hard limit of
approximately 2 Gb. To reduce the amount of virtual memory or disk storage
required, use the RECORD_LIFETIME option to reduce the
length of time records are retained.