diff mbox

[v2,12/12] savevm: icrease the IO_BUF_SIZE to improve the speed of savevm

Message ID 35a0a30a983efdecf0d79477789613d0a2dada57.1363957855.git.phrdina@redhat.com
State New
Headers show

Commit Message

Pavel Hrdina March 22, 2013, 1:16 p.m. UTC
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 savevm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake March 26, 2013, 10:05 p.m. UTC | #1
On 03/22/2013 07:16 AM, Pavel Hrdina wrote:

s/icrease/increase/ in the subject

Some benchmark numbers in the commit message justifying your change
would be nice.

> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
>  savevm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/savevm.c b/savevm.c
> index 3e3d5f8..532c1be 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -112,7 +112,7 @@ void qemu_announce_self(void)
>  /***********************************************************/
>  /* savevm/loadvm support */
>  
> -#define IO_BUF_SIZE 32768
> +#define IO_BUF_SIZE 1 * 1024 * 1024

Improperly parenthesized; needs to be:

#define IO_BUF_SIZE (1 * 1024 * 1024)
Pavel Hrdina March 27, 2013, 5:42 p.m. UTC | #2
On 26.3.2013 23:05, Eric Blake wrote:
> On 03/22/2013 07:16 AM, Pavel Hrdina wrote:
>
> s/icrease/increase/ in the subject
>
> Some benchmark numbers in the commit message justifying your change
> would be nice.
>
>> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
>> ---
>>   savevm.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/savevm.c b/savevm.c
>> index 3e3d5f8..532c1be 100644
>> --- a/savevm.c
>> +++ b/savevm.c
>> @@ -112,7 +112,7 @@ void qemu_announce_self(void)
>>   /***********************************************************/
>>   /* savevm/loadvm support */
>>
>> -#define IO_BUF_SIZE 32768
>> +#define IO_BUF_SIZE 1 * 1024 * 1024
>
> Improperly parenthesized; needs to be:
>
> #define IO_BUF_SIZE (1 * 1024 * 1024)
>

I'm testing it now and it seems that there is no speed improvement.
I'll drop this patch from the series.

Both values makes first snapshot (means that there is no snapshot at 
all) in about 30s. Second snapshots takes about 320s and third snapshot 
after restarting qemu process takes the same as second snapshot.

Test enviroment is:
     guest:
         2G ram
         2 vcpus
         qcow2 disk image

     host:
         12G ram
         1cpu/4 core/8 threads
         ordinary 7200rpm/500G hdd
diff mbox

Patch

diff --git a/savevm.c b/savevm.c
index 3e3d5f8..532c1be 100644
--- a/savevm.c
+++ b/savevm.c
@@ -112,7 +112,7 @@  void qemu_announce_self(void)
 /***********************************************************/
 /* savevm/loadvm support */
 
-#define IO_BUF_SIZE 32768
+#define IO_BUF_SIZE 1 * 1024 * 1024
 
 struct QEMUFile {
     const QEMUFileOps *ops;