General Troubleshooting

The following is general troubleshooting information for both MemSQL and MemSQL Ops. Troubleshooting content for specific error codes is covered here.

My hosts have less than minimum MemSQL system requirements. How can I make MemSQL run on those hosts?

MemSQL is designed to run on machines with at least 4 CPU cores and 8 GB RAM. MemSQL can run on machines with lower resources, but users who choose to run MemSQL this way should understand that this could lead to a less ideal experience.

The only users who should deploy MemSQL this way are those who are:

  1. Running MemSQL on a development environment with low system resources, fully understanding that their test and production systems should have at least 4 CPU cores and 8 GB RAM to function optimally.
  2. Configuring MemSQL on aggregator nodes after having run performance benchmarks on their MemSQL cluster and determining it is acceptable for those machines to run with low resources during peak production workloads.

To run MemSQL on systems below the minimum system requirements, do the following:

  1. Install MemSQL Ops using the --ignore-min-requirements flag when running the install.sh script.
  2. Go through the standard process of installing MemSQL using MemSQL Ops.
  3. Add the following lines to the memsql.cnf file for each specific MemSQL node you would like to lower the requirements for:

    minimum_core_count = <NUM_CORES>
    minimum_memory_mb = <NUM_MB>
    
  4. Restart the MemSQL nodes for which you have modified the memsql.cnf file. You can do so using the memsql-ops memsql-restart command.

What is using memory on my leaves?

MemSQL keeps detailed accounting of how memory is being used. You can run the query SHOW STATUS EXTENDED on an individual MemSQL instance to see this break down. You can also see this information in the MemSQL Ops web UI if you navigate to the status page for a MemSQL instance. You can do this from the cluster view by clicking into an individual host and then further clicking into an individual MemSQL node. See SHOW STATUS for more information.

Summary variables

The following are summary variables that describe overall memory use:

Other variables

There are a few variables that describe memory used by components not directly related to running queries or storing data:

Row store variables

Row store has a set of allocators it uses for various part of an index. These values can be helpful when determining rowstore table size.

Reducing Memory Use by Row Store Tables

If rowstore tables are using too much memory there are a few things you can do:

If you want more details on how much memory is used by each table, use the following:

Columnstore Table Considerations

Columnstore tables (in MemSQL 4.1 and above) have a hidden rowstore table that buffers small inserts into the columnstore table in memory. When enough rows have accumulated in memory, the rows are removed from memory and converted to columnstore format in batch and pushed to disk. The memory use for this hidden rowstore table will show up the same way as a regular rowstore table.

Columnstore tables also store metadata about the files stored on disk in memory. Each file has a row stored in memory with some information about this file (max and min value of the column in this file, bitmap of rows that are deleted, etc.). The memory use for columnstore metadata is currently not broken out into a separate component, but it is included as rowstore memory use along with all other rowstore tables because metadata tables are implemented as hidden rowstore tables. The memory use for columnstore metadata should be small unless the columns are storing large values (the max and min value will be large in this case).

Was this article useful?