Hi Jonas,
On Mon, Nov 19, 2018 at 01:18:26PM -0800, Jonas Krauss wrote:
> We have 1742 SST files, with a total of 345G in five levels, should be okay?
>
> As I wrote, setting rocksdb_max_open_files to -1 unfortunately also saw the
> steady increase in memory usage, I actually left this at the default (-1)
> when we recognized the observed behavior.
>
> Do you have some info why rocksdb_no_file_closes is staying zero?
>
I'm looking at the source code
* Rocksdb_no_file_closes is counted inside RocksDB. MariaDB only passes the
counter value to the user
* In RocksDB, the only mentions of NO_FILE_CLOSES are:
include/rocksdb/statistics.h|144| NO_FILE_CLOSES,
include/rocksdb/statistics.h|387| {NO_FILE_CLOSES, "rocksdb.no.file.closes"},
java/rocksjni/portal.h|3204| case rocksdb::Tickers::NO_FILE_CLOSES:
java/rocksjni/portal.h|3408| return rocksdb::Tickers::NO_FILE_CLOSES;
java/src/main/java/org/rocksdb/TickerType.java|262| NO_FILE_CLOSES((byte) 0x2F),
I don't see a single place where the ticker is incremented.
Let's take some other counter, NUMBER_DB_SEEK_FOUND. The search does find calls
to increment its value:
db/db_iter.cc|1302| RecordTick(statistics_, NUMBER_DB_SEEK_FOUND);
db/db_iter.cc|1353| RecordTick(statistics_, NUMBER_DB_SEEK_FOUND);
db/db_iter.cc|1397| RecordTick(statistics_, NUMBER_DB_SEEK_FOUND);
db/db_iter.cc|1443| RecordTick(statistics_, NUMBER_DB_SEEK_FOUND);
include/rocksdb/statistics.h|138| NUMBER_DB_SEEK_FOUND,
include/rocksdb/statistics.h|383| {NUMBER_DB_SEEK_FOUND, "rocksdb.number.db.seek.found"},
...
I've also checked
* the version of RocksDB that is used by facebook/mysql-5.6
* the latest revision of RocksDB on github.
It's all the same - I don't see any calls to increment NO_FILE_CLOSES. This is
probably a bug in RocksDB. But I guess it's not related to the high memory
usage issue you're observing.
>
> On Monday, November 19, 2018 at 8:06:00 PM UTC+1, Yoshinori Matsunobu wrote:
> >
> > How many SST files do you have on your instance? SST files are stored
> > under rocksdb_datadir.
> > Could you try rocksdb_max_open_files=-1 and see if leak reproduces? We
> > generally recommend keeping the number of SST files under control (less
> > than 65536) and
> > setting rocksdb_max_open_files=-1.
> >
> > - Yoshinori
> >
> > On Nov 19, 2018, at 10:58 AM, Jonas Krauss <
jkra...@gmail.com
> > <javascript:>> wrote:
> >
> > Hi all,
> >
> > I am trying to put a MariaDB MyRocks database into production and right
> > now I am facing problems regarding the memory usage of MyRocks. I haven't
> > been able to identify one specific problem but the following links
> > contained some useful information:
> >
> >
https://github.com/facebook/rocksdb/issues/3216
> >
> >
https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB
> >
> > The current behavior of the mysqld process is that when putting the
> > database into production (an OLTPish process) on a machine with 64G RAM and
> > a block cache configured with 16G it starts to slowly accumulate more and
> > more memory until swap is used. This is obviously not suitable for
> > production.
> >
> > Currently I am wondering about a particular statistic, the number of open
> > and closed files. *Particularly I am wondering why Rocksdb_no_file_closes
> > is staying a zero at all time while Rocksdb_no_file_opens slowly increases
> > over time.* Does anybody know why that is? Could it be responsible for
> > email to
myrocks-dev...@googlegroups.com <javascript:>.
> > <javascript:>.
> > <
https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_myrocks-2Ddev_c8794134-2D9940-2D4ef6-2D881b-2Db1f30ee958e0-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=h7I09O8mW25YOy83cdKu0g&m=EZkjwXf4rfovSZwy8HenfjiomLiMlBuhnILAQdPNUM0&s=emLPW4nnXKxp7IEFbJZH71-_IpO1ihCg5QSKyW_eQu8&e=>
> > .
> > <
https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=h7I09O8mW25YOy83cdKu0g&m=EZkjwXf4rfovSZwy8HenfjiomLiMlBuhnILAQdPNUM0&s=n324xy6E9rtPuYS_L3nT7A3HoXq85Hkodv5hmVTF7Ak&e=>
> > .
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "MyRocks - RocksDB storage engine for MySQL" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
myrocks-dev...@googlegroups.com.
> To post to this group, send email to
myroc...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/myrocks-dev/ea9936cc-a936-41b9-aa8f-2c4bc5b53183%40googlegroups.com.
--
BR
Sergei
--
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog:
http://s.petrunia.net/blog