Live data from Hacker News

What Does a Database for SSDs Look Like?

brooker.co.za

1–10 of 127 posts

Re: What Does a Database for SSDs Look Like?

#2
> Design decisions like write-ahead logs, large page sizes, and buffering table writes in bulk were built around disks where I/O was SLOW, and where sequential I/O was order(s)-of-magnitude faster than random.

Overall speed is irrelevant, what mattered was the relative speed difference between sequential and random access.

And since there's still a massive difference between sequential and random access with SSDs, I doubt the overall approach of using buffers needs to be reconsidered.

Re: What Does a Database for SSDs Look Like?

#3
Median database workloads are probably doing writes of just a few bytes per transaction. Ie 'set last_login_time = now() where userid=12345'.

Due to the interface between SSD and host OS being block based, you are forced to write a full 4k page. Which means you really still benefit from a write ahead log to batch together all those changes, at least up to page size, if not larger.

Re: What Does a Database for SSDs Look Like?

#5
Author could have started by surveying current state of art instead of just falsely assuming that DB devs have just been resting on the laurels for past decades. If you want to see (relational) DB for SSD just check out stuff like myrocks on zenfs+; it's pretty impressive stuff.

Re: What Does a Database for SSDs Look Like?

#6

Median database workloads are probably doing writes of just a few bytes per transaction. Ie 'set last_login_time = now() where userid=12345'. Due to the interface between SSD and host OS being block based, you are forced to write a full 4k page. Which means you really still benefit from a write ahead log to batch together all those changes, at least up to page size, if not larger.

Don't some SSDs have 512b page size?

Re: What Does a Database for SSDs Look Like?

#7
post #6

Median database workloads are probably doing writes of just a few bytes per transaction. Ie 'set last_login_time = now() where userid=12345'. Due to the interface between SSD and host OS being block based, you are forced to write a full 4k page. Which means you really still benefit from a write ahead log to batch together all those changes, at least up to page size, if not larger.

Don't some SSDs have 512b page size?

They might present 512 blocks to host, but internally the ssd almost certainly manages data in larger pages

Re: What Does a Database for SSDs Look Like?

#8
post #7
post #6

Earlier quoted context omitted.

Don't some SSDs have 512b page size?

They might present 512 blocks to host, but internally the ssd almost certainly manages data in larger pages

And the filesystem will also likely be 4k block size.

Re: What Does a Database for SSDs Look Like?

#10
post #6

Median database workloads are probably doing writes of just a few bytes per transaction. Ie 'set last_login_time = now() where userid=12345'. Due to the interface between SSD and host OS being block based, you are forced to write a full 4k page. Which means you really still benefit from a write ahead log to batch together all those changes, at least up to page size, if not larger.

Don't some SSDs have 512b page size?

I would guess by now none have that internally. As a rule of thumb every major flash density increase (SLC, TLC, QLC) also tended to double internal page size. There were also internal transfer performance reasons for large sizes. Low level 16k-64k flash "pages" are common, and sometimes with even larger stripes of pages due to the internal firmware sw/hw design.
Post reply on HN