Optimizing Datameer and MySQL
As of Datameer X version 6.0, only versions 5.5 and above are supported for MySQL.
Optimizing the Datameer X Process
You can add more memory to the JVM Process, by changing the default allocation of 1G, in <DAS>/etc/das-env.sh:
export JAVA_OPTIONS="
-Xmx1024m
-XX:MaxPermSize=384m
-Xms256m
-XX:MaxNewSize=448m
-XX:SurvivorRatio=6
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=80
-XX:+HeapDumpOnOutOfMemoryError
"
Optimizing MySQL
You can optimize MySQL by enabling the query cache.
To enable the query cache:
Edit the MySQL configuration file my.cnf and append the following options to it:
query_cache_size = 50000000
query_cache_type=1
query_cache_limit=1048576
These options enable a 50MB query cache that caches all queries except the queries that indicate they shouldn't be cached. The last option sets a query result limit to 1MB. Setting these values in the my.cnf file makes these setting permanent after a restart.
It is also possible to change these while the database is running.
Connect to your MySQL database with the following command:
mysql -u root -pSet the settings:
set global query_cache_size=50000000;
set global query_cache_type=1
set global query_cache_limit=1048576
To check whether the query cache is enabled, run the following command after connecting to your MySQL database:
show variables like 'query%'
This command should return the a list of query settings. Check for the settings listed above to confirm that these values have taken effect.
Another optimization on mySQL:
Enter the following command on the server where the mysql is installed.
mysqlanalyze -A -uroot -p
mysqloptimize -A -uroot -p
optimize table data_source_data;