[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924190#comment-13924190
 ] 

Sijie Guo commented on BOOKKEEPER-716:
--------------------------------------

this is mostly for preventing corruption, not pref.

for example, say sector size 512, first flush writes data from 0 to 415, which 
will cause syncing sector 0. second flush writes data from 415 to 600, which 
will cause syncing sector 0 & 1. if machines is crashed during second flush (if 
the filesystem is not COW filesystem or transactional), sector 0 might be 
corrupted, which we might lose data of first flush.

this change will try to padding bytes for each flush to align with sector size. 
so in the above example, first flush will write 0 to 512, while second flush 
will write from 512. as we don't have exact ideas on device layout, this patch 
is trying the best to prevent corruption.

715 & 717 changes are mostly for performance. in our case, we are more 
concerned about sustained low latency in a high throughput (e.g. a bookie could 
have p99 latency less than 10ms in 15K). before 715, we couldn't get a 
sustained throughput in low latency, since it kept reading pages in journal 
disk, which cause journal disk to be in high iowait. before 717, if any spikes 
on disk will introduce lots of single entry syncs, and hence cause journal disk 
to be in high iowait. after 715 & 717, we could have pretty stable sustained 
throughput with low latency. but I don't exact number how best that we could 
do. at least, we could handle 6ms group commit interval under 15k/s for a 
single bookie.

> padding writes for bookie journal
> ---------------------------------
>
>                 Key: BOOKKEEPER-716
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-716
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.3.0
>
>         Attachments: BOOKKEEPER-716.diff, BOOKKEEPER-716_715.diff
>
>
> it would be better to pad journal writes to align sector size, which to avoid 
> second syncing corrupt an already synced sector/page.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to