配置memtable阈值

配置memtable阈值

配置memtable阈值可以提高写入性能。Cassandra将memtables刷新到磁盘,并在超过提交日志空间阈值或memtable清除阈值时创建SSTables 。配置cassandra.yaml中每个节点的提交日志空间阈值 。如何调整memtable的阈值取决于数据和写入负载。在这些条件下增加memtable阈值:

  • 写入负载在较小的一组数据上包含大量的更新。

  • 连续的写入发生。这一行动导致更有效的压缩。

为memtables分配内存将减少可用于缓存和其他内部Cassandra结构的内存,因此请仔细调整并以小增量调整。

Memtable设置

  • memtable_allocation_type:默认heap_buffers,Cassandra用来分配和管理memtable内存的方法。在版本3.2.0和3.2.1中,唯一有效的选项是: heap-buffers(在堆NIO (非阻塞I / O)缓冲区上)。

  • memtable_cleanup_threshold:默认1 /(memtable_flush_writers + 1)

  • file_cache_size_in_mb:默认较小的1/4 heap或512,用于SSTable读缓冲区的总内存。

  • buffer_pool_use_heap_if_exhausted :默认true,指示当SSTable缓冲池耗尽(当缓冲池超过最大内存file_cache_size_in_mb时),Cassandra是否分配堆内或堆外内存,超出此数量时,Cassandra会停止缓存缓冲区,但根据要求分配。

  • memtable_flush_writers :默认内核数量最少为2,最多为8,memtable刷新写入程序线程的数量。这些线程被磁盘I / O阻塞,每个线程在被阻塞的时候在内存中保存一个memtable。如果您的数据目录由SSD支持,请将此设置增加到核心数量。

提交日志设置

  • commitlog_sync :默认periodic,用于确认写入的方法,以毫秒为单位:

    • periodic:10000毫秒(10秒)使用 commitlog_sync_period_in_ms控制提交日志同步到磁盘的频率。定期同步立即得到确认。

    • batch:默认disabled,通过 commitlog_sync_batch_window_in_ms (默认值:2 ms)控制Cassandra在执行同步之前等待其他写入的时间。启用此方法后,Cassandra不会确认写入,直到它们被磁盘读取为止。

  • commitlog_segment_size_in_mb :默认32 MB,单个提交日志文件段的大小。在将所有数据刷新到SSTable之后,可以对commitlog段进行归档,删除或回收。这些数据可能包含系统中每个表的提交日志段。默认大小通常适用于大多数提交日志归档,但如果您想要更精细的粒度,则8或16 MB是合理的。
    默认情况下,max_mutation_size_in_kb被设置为的一半commitlog_segment_size_in_kb。

  • max_mutation_size_in_kb :默认commitlog_segment_size_in_mb的 1/2 。如果突变的大小超过这个值,则突变被拒绝。在增加commitlog段的commitlog段的大小之前,调查为什么突变比预期的大。查找访问模式和数据模型的基本问题,因为增加commitlog段的大小是一个有限的修复。
    注意:如果max_mutation_size_in_kb 明确设置 ,则必须commitlog_segment_size_in_mb至少设置 max_mutation_size_in_kb / 1024的两倍。

  • commitlog_compression :默认not enabled,压缩提交日志时使用的压缩器。有效值: LZ4,Snappy或 Deflate。如果没有为此属性设置值,则提交日志将被解压缩。

  • cdc_total_space_in_mb:默认4096 MB和占用的驱动器总空间的1/8cdc_raw_directory 。
    注意:如果空间超过这个值,Cassandra将会抛出 WriteTimeoutException包括启用CDC的表在内的Mutations。CDCCompactor(消费者)负责解析原始CDC日志,并在解析完成时将其删除。

  • cdc_free_space_check_interval_ms:默认250 ms,当达到cdc_raw限制并且CDCCompactor运行在后面或遇到背压时,将检查此间隔以查看cdc跟踪表的任何新空间是否已经可用。

  • commitlog_total_space_in_mb :默认32位JVM为32 MB,64位JVM为8192 MB。
    注意:用于提交日志的总空间。如果所有提交日志使用的总空间高于此值,则Cassandra将舍入到下一个最接近的多个数据块,并将memtables刷新到最旧的commitlog段的磁盘,从提交日志中删除这些日志段。这减少了在启动时重播的数据量,并防止不经常更新的表无限期地保持提交日志段。如果 commitlog_total_space_in_mb 很小,结果是在较不活跃的表格上更具活性。

SQLMemTable for Delphi / C++ Builder: README============================================Please read this file carefully (especially the INSTALLATION chapter) before installing the program to your computer.Contents-------- Program information Company information Description Specification Features and Benefits Installation Purchasing / Registration Copyright and licenses Warranty and guarantee Technical support Important note Other products recommended to useProgram information-------------------Program Name: SQLMemTableLicense Types: Personal (for personal use, without source code) Com (for 1 developer, without source code) Pro (for 1 developer, with source code) Team4 (for 4 developers, with source code) Team8 (for 8 developers, with source code) Enterprise (Enterprise License - for entire company, with source code)Program Version: 1.00Program Release Date: 07/15/2003Program Purpose: SQLMemTable is a compact, fast and powerful in-memory table with SQL support. Target Environment: Delphi 4, 5, 6, 7 and C++ Builder 4, 5, 6.Company information-------------------Company Name: AidAim SoftwareContact E-mail Address: support@aidaim.comContact WWW URL: http://www.aidaim.comDescription-----------SQLMemTable is a compact in-memory table with SQL support for Delphi and C++ Builder. SQLMemTable does not require BDE and provides all the TTable‘s functionssuch as Master/Detail relationship, Filtering, Searching, Sorting, Key, Range, BLOB fields, and has some advanced features such as BLOB data compression, multi-indexes and table restructuring, shareable in memory capabilities. It is fully compatible with all standard DB controls, supports calculated and lookup fields as well as internationalization/localization and Unicode, provides data importing from and exporting to any dataset, includes SQLConsole utility with source code, comprehensive help and demos.SQLMemTable provides the following services: - SQL support - Master / detail relationship - Creating, renaming, emptying, deleting and restructuring tables - Creating, editing, deleting, navigating and searching for records - Creating and deleting multiple indexes - Calculated and lookup fields - Filtering support - Using BLOB fields with data compression ability - Importing from and exporting to any dataset in fast and easy way - Internationalization/Localization and Unicode supportSQLMemTable does not require BDE or any external drivers and has small footprint. Its search performance is excellent and data access speed is extremely fast.Specification-------------Data types: ftAutoInc, ftInteger, ftSmallInt, ftFloat, ftDateTime, ftDate, ftTime, ftBLOB, ftMemo, ftGraphic, ftString (any fixed length string), ftCurrency, ftWord, ftBoolean, ftLargeInt, ftFmtMemo, ftBytes, ftWideString.Advanced data types: aftExtended, aftWideMemoMaximum records quantity: up to 2^31 (over 2 billions). Maximum fields per table: 2^31 (over 2 billions). Maximum indexes per table: 2^31 (over 2 billions). Maximum index fields per index: 2^31 (over 2 billions). Maximum field name‘s length: 255 characters.Maximum index name‘s length: 255 characters.BLOB fields block size: > 1 byte, default 100 Kb. BLOB compression: ZLib, BZip, PPM Search operators: <,>,=,<>,<=,>=, like, not like, is null, is not null, and, or, not, (). Features and Benefits---------------------Compactness. - Short compiled code with approximate size 300 Kb, no external drivers (such as BDE) required. - Small memory consumption by SQLMemTable database engine. - Fast BLOB data compression. Your large data fields will need less memory. SQLMemTable can compress data on the fly. The compression routines used in the SQLMemTable are much faster than most of popular archivers like PKZip, WinRar, Arj. High performance. - Fast search by B-tree indexes. At the moment SQLMemTable is one of the fastest existing in-memory tables for Delphi and C++ Builder. - High-speed memory operations performance is achieved by means of using specially optimized memory manager and tuned algorithms. - Quick operations with strings. SQLMemTable compares strings up to 3 times faster than standard Delphi string routines. High performance is achieved by using a special library written in Assembler and an advanced sorting algorithm. - Advanced SQL optimizer often makes query execution several times faster by choosing the best execution plans. Functionality. - A subset of SQL‘92 including DDL operators is supported by TSQLMemQuery component. With SQLMemTable you can create SQL scripts for creating tables, inserting, editing and deleting records, retrieving data by SELECT command. - Advanced search engine. SQLMemTable supports ‘LIKE‘ operator with wildcards ‘%‘ and ‘_‘, as well as ‘IS NULL‘ and ‘IS NOT NULL‘ in filters and queries. - Full multiple index support, i.e. numerous fields in a table may comprise an index. SQLMemTable provides descending and ascending indexes, case-sensitive and insensitive indexes for string fields. - Shareable in-memory tables. SQLMemTable supports simultaneous access to a table by multiple TSQLMemTable components within a single application. - Default values support. - Record-level constraints, i.e. constraints that must be met when editing the data. Compatibility. - SQLMemTable supports most of TTable field data types, including BLOB fields, moreover it allows to create string and wide string fields of any fixed length. - SQLMemTable is fully compatible with standard DB-aware visual controls such as QuickReport, DBGrid, DBNavigator, DBImage, DBMemo, DBRichEdit, as well as with third party vendor‘s products supporting TDataset descendant components - FastReport, DBFlyTreeView and others. - Calculated and lookup fields can be used in the same way as TTable. - Most of TTable functions are supported including Key and Range methods. Convenience. - Table restructuring is being performed in the easiest way keeping all the existing data. - Data importing from and exporting to any dataset is supported. SQLMemTable provides you with the simplest way to import and export tables using ImportTable and ExportTable methods. - Internationalization / localization support. All text search and sorting functions use current system locale, so localizing your program with SQLMemTable is a very simple task. - Unicode support. All the text operations work with multi-byte encoding using ftWideString. - Comprehensive help. SQLMemTable comes with full documentation presented in SQLMemTable Developer‘s Guide and SQLMemTable Reference. Installation------------1) Make sure that all copies of Delphi (or C++ Builder) are currently closed and not running on the target system. Also, if you are replacing an existing version of SQLMemTable, please remove all files and the package of the prior version before running the new setup program.2) Unpack zip archive containing SQLMemTable into any directory. 3) Run the INSTALL.EXE from this directory.4) Follow on-screen instructions of step-by-step setup wizard to install SQLMemTable.5) If after the installation SQLMemTable components don‘t appear in Components Palette of the IDE, please follow the next instructions: * From the IDE, select ‘Component | Install Packages...‘. * Click the ‘Add‘ button. * In the ..SQLMemTableLibDelphi# (or ..SQLMemTableLibC++ Builder#) directory, select the dclSQLMemTableD#.BPL (or dclSQLMemTableB#.BPL) file. * Click the ‘OK‘ button to close the dialog. * Finally, select ‘Tools | Environment Options‘ from the main menu. From this dialog, select the ‘Library‘ tab and insure that the ..SQLMemTableLibDelphi# (or ..SQLMemTableLibC++ Builder#) directory is included in the ‘Library Path‘ line.Purchasing / Registration-------------------------Visit our site http://www.aidaim.com to purchase or register the product.Copyright and license---------------------See "license.txt" file.Warranty and guarantee----------------------See "license.txt" file.Technical support-----------------Before you contact us, please do the following: - Make sure you have performed all the required steps correctly. - Look at the Help files and Demos: it may already contain an answer to your question. A lot of people ask us something like "how do I:", though the complete information is there. - Visit our Internet site at http://www.aidaim.com. It‘s a good chance that you‘ll find the newer version of our product there.If the problem persists, please, inform us about the following: - SQLMemTable version. - Where did you obtain SQLMemTable (http or ftp site). - Compiler information: Delphi or C++ Builder, Version, Edition, Service Pack - Environmental information: your OS and Service Pack - Description of your problem (as much information as possible to retrieve the problem). - Attach a test project where the problem could be reproduced (it helps us to solve your issue as soon as possible)Typically AidAim Software Support Team answer messages in 24 hours, but depending on singularity and difficulty of your question it may take a bit longer.Should you have any ideas on improving the existing functions of this product after you have downloaded and used it, be easy to e-mail us. All registered users who buy this product may also send their offers to add new possibilities and/or to change the product‘s functions.We consider any ideas and we may take them into account while creating new versions of our products.Other products AidAim Software recommended-------------------------------------------All the products in this chapter are fully compatible with SQLMemTable and recommended to work with our product. AidAim Software had tested all these products released by our partner companies for complete compatibility with SQLMemTable. In its turn, all the partner companies have carried out similar testing of the compatibilityof SQLMemTable with their own products. All the companies whose products present here are technology partners of AidAim Software. It means that both partner companies guarantee the correct joint work of the products. In case of encountering bugs in the time of joint work and owing to it, the partners incur the obligation to resolve such problems for their clients for FREE. FastReport Software -------------------Advanced report generators for Delphi and Kylix.Web Site: http://www.fast-report.comFastReport VCL--------------FastReport VCL is reporting tool component for Borland Delphi 2-6 and Borland C++Builder 3-5. It consists of report engine, designer and preview. Some FastReport possibilities are really unique. The generator allows you to create tables, queries and databases in run-time. Built-in dialog designer allows you creation of dialog forms (they can be used for asking some parameters before printing a report). You also able to use built-in Pascal-like interpreter to do rather complex data processing. In spite of power of FastReport, its code is quite small. Probably FastReport is leader in correlation of functionality/size. The FastReport kernel (without designer) adds to your program the small footprint (less than QR3), but its functionality is like in ReportBuilder‘s one.FastReport CLX edition----------------------FastReport CLX edition is powerfull of FastReport for Borland Delphi 6 and Borland Kylix 1-2 for Linux. It use new CLX-library. Do you want to create reports for Linux as well as for Windows? Use FastReport CLX edition!FastReport VCL 2.3 lite-----------------------FreeWare version of FastReport. Imca Systems DevTeam --------------------Imca Systems DevTeam - Flexible and powerful Delphi/C++ Builder/ActiveX trees, grids and editors.Web Site: http://www.9rays.netDBFlyTreeView Suite-------------------Add grid and treeview functionality with a single component. DBFlyTreeView is a fully customizable, data-bound grid and tree view component that allows you to add huge arrays of nodes. OLE drag-and-drop is supported and the component is customizable at both design-time and runtime. DBFlyTreeView supports custom colors, fonts, and alignment for each cell, and you can even create scrollable background wallpapers without creating huge bitmaps.Included: RapidTree, FlyTreeView, PropertiesTree, DBFlyTreeView controls.DBFlyTreeViewPro Suite----------------------Enable your Delphi and C++Builder applications to display and browse hierarchical, table, and list data. DBFlyTreeViewPro Suite is a set of VCL components that are a direct descendent from FlyTreeViewPro. It supports more than 40 types of in place editors plus your custom format. It is data-aware and allows you to draw any array of cells directly to a printer, Metafile, or Bitmap canvas.Included: RapidTree, IsPlugeditor, FlyTreeViewPro, PropertiesTreePro, DBFlyTreeViewPro controls.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值