Configuring the MAST Gateway Service
About this task
After installing MAST Gateway service, perform the following steps on the node if file system is not installed on the node. If file system is (also) installed on the node, start at step 4:
Procedure
-
Run
configure.shutility.For example:/opt/mapr/server/configure.sh -C <CLDB nodes> -Z <Zookeeper nodes> -N <ClusterName> -
Start Warden if it is already not running.
service mapr-warden start -
Run
jpsor/etc/init.d/mapr-mastgateway statusto check whether MAST Gateway is running on the node. -
Open the
/opt/mapr/conf/mastgateway.conffile and set values for the following parameters:Parameter Default Value Description mastgateway.port8660 The port on which the MAST Gateway process runs. Default value is 8660. mastgateway.worker.numthreads16 The number of threads to execute tiered data operations such as read and modify part of the offloaded data. The default value is 16. You can modify this based on the machine’s configuration. mastgateway.cntr.worker.numthreads16 The number of threads to use to execute container-based tiered data operations such as offload and recall of file-level and volume-level data in parallel. The default value is 16. TIPFor faster offload, modify this value based on the machine’s configuration.mastgateway.logfile.size.mb1024 The maximum size (in MB) of the MAST Gateway log file. When the size limit is reached, the logs get rolled over. mastgateway.readsvcops.nthreads0 The number of threads in the exclusive threadpool that serves the read operations for MAST gateway. 0 indicates that there is no separate threadpool for the MAST gateway to cater to read operations on tiered volumes.
Set the value to a non-zero positive integer representing the number of threads to serve the read operations for the MAST gateway.For example, if you want to assign 16 threads in the threadpool that serves the MAST gateway exclusively for read operations on volumes, you can set the value of the
mastgateway.readsvcops.nthreadsparameter to 16.mastgateway.debug.nthreads0 The number of threads in the exclusive threadpool that serves the debug operations on the MAST gateway. 0 indicates that there is no separate threadpool to cater to debug commands/operations on MAST gateway.
Set the value to a non-zero positive integer representing the number of threads to serve the debug commands/operations on the MAST gateway.For example, if you want 16 threads in the threadpool that serves the debug commands/operations related to the MAST gateway, you can set the value of the
mastgateway.debug.nthreadsparameter to 16.NOTEIf you modify themastgateway.conffile, you must restart the MAST Gateway for the changes to take effect. -
(Optional) Add the following parameters in the
/opt/mapr/conf/mastgateway.conffile only if you wish to customize libcurl.The MAST Gateway uses libcurl to perform tiering-related operations. The following table lists the customizable libcurl options and their default values. If these are not set in themastgateway.conffile, the default values are used.NOTEIn themastgateway.conffile, add only the parameters that you wish to customize.
For example, to configure the MAST Gateway for proxy server, yourParameter Default Value Description mastgateway.curl.timeout300000 Timeout for the entire request. mastgateway.curl.connecttimeout60000 Timeout for the connection phase. mastgateway.curl.nosignal0 Do not install signal handlers. mastgateway.curl.followlocation0 Follow HTTP redirects. mastgateway.curl.maxsendspeed0 Limit on data upload speed. mastgateway.curl.maxrecvspeed0 Limit on data download speed. mastgateway.curl.maxconnects5 Maximum number of connections in the connection pool. mastgateway.curl.dnsserversnull Preferred DNS servers. mastgateway.curl.interfacenull Bind connection locally to this. mastgateway.curl.verifypeer1 Verify the SSL certificate. mastgateway.curl.verifyhost2 Verify the host name in the SSL certificate. mastgateway.curl.cainfonull CA cert bundle. mastgateway.curl.issuercertnull Issuer certificate. mastgateway.curl.sslcertnull Client cert. mastgateway.curl.sslcerttypenull Client cert type. mastgateway.curl.sslkeynull Client key. mastgateway.curl.sslkeytypenull Client key type. mastgateway.curl.sslkeypasswdnull Client key password. mastgateway.curl.proxynull Proxy to use.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.preproxynull Socks proxy to use. mastgateway.curl.proxyport0 Proxy port to use.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.proxytype0 Proxy type.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.httpproxytunnel0 Tunnel through the HTTP proxy.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.proxyusernull Proxy user name.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.proxypasswdnull Proxy password.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.proxyauth1 HTTP proxy authentication methods.
Note: Specify a value for this parameter to configure MAST Gateway to use a proxy server. See example below this table for more information.
mastgateway.curl.proxyverifypeer1 Verify the proxy's SSL certificate. mastgateway.curl.proxyverifyhost2 Verify the proxy certificate's name against host. mastgateway.curl.proxycainfonull Path to proxy Certificate Authority (CA) bundle. mastgateway.curl.proxysslcertnull SSL proxy client certificate. mastgateway.curl.proxysslcerttypenull Type of the proxy client SSL certificate. mastgateway.curl.proxysslkeynull Private keyfile for TLS and SSL proxy client cert. mastgateway.curl.proxysslkeytypenull Type of proxy private key file. mastgateway.curl.proxysslkeypasswdnull Passphrase for proxy private key. mastgateway.conffile settings for proxy server should look similar to the following:mastgateway.curl.proxy=10.20.30.140 mastgateway.curl.preproxy=null mastgateway.curl.proxyport=3128 mastgateway.curl.proxytype=0 mastgateway.curl.httpproxytunnel=0 mastgateway.curl.proxyuser=proxyuser mastgateway.curl.proxypasswd=proxyuserpwd mastgateway.curl.proxyauth=1 -
Save and close the
/opt/mapr/conf/mastgateway.conffile. -
(Optional) Configure memory for the MAST Gateway in the
/opt/mapr/conf/conf.d/warden.mastgateway.conffile by setting values for the following parameters:
By default, 10% of the node memory or 20GB, whichever is lower, is allocated to MAST Gateway. If the MAST Gateway is processing jobs for both warm and cold tiers, memory consumption can increase up to 7GB or more. If you see high memory alarms for small memory consumption also, tune the percentage of memory allocated for MAST Gateway. Ensure that the percentage of memory allocated throughParameter Default Value Description service.heapsize.min2048 The minimum amount of node memory (in MB) to allocate. service.heapsize.max20480 The maximum amount of node memory (in MB) allocate. service.heapsize.percent10 The percentage of node memory to allocate. service.heapsize.percentis available for MAST Gateway. -
(Optional) Set the value for
fs.mapr.pool.queue.max_sizeparameter to 20000 in the/opt/mapr/conf/dbclient.conffile.If compression is enabled on the data in a tiering-enabled volume, tiering jobs can fail and return errors because of the large number of operations sent to the DB (where metadata for offloaded data is stored). To prevent errors, add thefs.mapr.pool.queue.max_sizeparameter to the/opt/mapr/conf/dbclient.conffile and set the value for this parameter to a large number, such as 20000. For example, your entry in the/opt/mapr/conf/dbclient.conffile should look similar to the following:fs.mapr.pool.queue.max_size = 20000 -
Restart the MAST Gateway for the changes to take effect.
See Starting, Stopping, and Restarting the MAST Gateway for more information.