| Bug #26137 | Record cache flushing is not efficient enough | ||
|---|---|---|---|
| Submitted: | 7 Feb 2007 8:05 | Modified: | 7 Feb 2007 11:33 |
| Reporter: | Mikko metsola | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Falcon storage engine | Severity: | S2 (Serious) |
| Version: | 5.2.0-alpha-win32 | OS: | Windows (Windows) |
| Assigned to: | CPU Architecture: | Any | |
[7 Feb 2007 8:05]
Mikko metsola
[7 Feb 2007 8:07]
Mikko metsola
test results
Attachment: falcon_max_record_memory_test.txt (text/plain), 9.10 KiB.
[7 Feb 2007 10:03]
Hakan Küçükyılmaz
Mikko, writing the records which are in memory to disk also depends on the transaction. If you did the INSERT test in single transaction, then all records are kept in memory until a COMMIT is done. Did you run your test with autocommit = 0? Regards, Hakan
[7 Feb 2007 10:44]
Jim Starkey
The "upper limit" on the record cache is not actually a limit, but the threshold point for the record scavenger. Since the scavenger is only activated every 30 seconds (by default), the record cache size will almost always exceed the upper bound.
That said, lets take a moment to review data flow in Falcon:
1. Transactional updates are made only to memory
2. At commit (and autocommit) time, updates are copied to the serial
log. After all data has been written to the serial log, the
serial log is flushed to disk.
3. Post commit, the "gopher" thread copies data from the serial
log to page images in the page cache.
4. Periodically, the check point process writes dirty pages from
the page cache to disk.
There is not a single thread that moves data from memory to disk. It is a multi-stage operation.
In the early alpha releases of Falcon, all uncommitted records are retained in memory. In a future baselevel, uncommitted records and index updates will be flushed to the serial log and subject to record scavenging. This will be both automatic and transparent.
[7 Feb 2007 11:33]
Mikko metsola
Hi, and thanks for your comments. In my test, I executed a commit after every 2000 rows. Looking at my test environment (the attached test table with 150 columns and maximum insert speed), what are the tools to make the data transfer from memory to disk more efficient when the upper limit is about to be reached? For example, can I configure the record scavenger to wake up "five times" more often? Together with commiting more often? Rgds, MMe
