Skip to contentSkip to conversation

makedumpfile 1.5.0 takes much more time to dump

DISCUSSION Vivek Goyal 3 participants 10 messages Sep 20, 2012 – Oct 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

From: Vivek Goyal <[email protected]>
Subject: makedumpfile 1.5.0 takes much more time to dump
Date: Thu, 20 Sep 2012 16:06:34 -0400

Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

Thanks.
HATAYAMA, Daisuke

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

From: HATAYAMA Daisuke <[email protected]>
Subject: Re: makedumpfile 1.5.0 takes much more time to dump
Date: Fri, 21 Sep 2012 09:23:57 +0900

Quoted 39 lines

From: Vivek Goyal <[email protected]>
Subject: makedumpfile 1.5.0 takes much more time to dump
Date: Thu, 20 Sep 2012 16:06:34 -0400

Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

Quoted 9 lines

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

I noticed a careless miss. 1TB is correct on your case.

N = 1TB / (4KB * 8 * 1MB) = 32 cycles.

So, about 95 seconds for one cycle?

Thanks.
HATAYAMA, Daisuke

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
In reply to HATAYAMA Daisuke
Quoted 39 lines · HATAYAMA Daisuke

From: Vivek Goyal <[email protected]>
Subject: makedumpfile 1.5.0 takes much more time to dump
Date: Thu, 20 Sep 2012 16:06:34 -0400

Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

Quoted 8 lines

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

Ok, so once we have your walking through page struct patches in, hopefully this problem will be gone?

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw

From: Vivek Goyal <[email protected]>
Subject: Re: makedumpfile 1.5.0 takes much more time to dump
Date: Fri, 21 Sep 2012 09:32:32 -0400

Quoted 44 lines · HATAYAMA Daisuke
Quoted 43 lines

From: Vivek Goyal <[email protected]>
Subject: makedumpfile 1.5.0 takes much more time to dump
Date: Thu, 20 Sep 2012 16:06:34 -0400

Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

Quoted 8 lines
Quoted 4 lines

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

Ok, so once we have your walking through page struct patches in, hopefully this problem will be gone?

Yes, then free page filtering is integrated in other mem_map array logics. You can see how it takes from the following message.

Excluding unnecessary pages : [100 %] STEP [Excluding unnecessary pages] : 0.204574 seconds

New logic takes equal to or quicker than the total time indicated by the above kind of messages now.

Quoted 4 lines

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Kumagai-san should decide this.

BTW, Kumagai-san, in what version do you plan release of this new mem_map logic? Around v1.5.2? I want to re-send a new patch set to which I add small changes and comments for maintainability.

Thanks.
HATAYAMA, Daisuke

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
Quoted 65 lines · HATAYAMA Daisuke

From: Vivek Goyal <[email protected]>
Subject: Re: makedumpfile 1.5.0 takes much more time to dump
Date: Fri, 21 Sep 2012 09:32:32 -0400

Quoted 44 lines · HATAYAMA Daisuke
Quoted 43 lines

From: Vivek Goyal <[email protected]>
Subject: makedumpfile 1.5.0 takes much more time to dump
Date: Thu, 20 Sep 2012 16:06:34 -0400

Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

Quoted 8 lines
Quoted 4 lines

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

Ok, so once we have your walking through page struct patches in, hopefully this problem will be gone?

Yes, then free page filtering is integrated in other mem_map array logics. You can see how it takes from the following message.

Excluding unnecessary pages : [100 %] STEP [Excluding unnecessary pages] : 0.204574 seconds

New logic takes equal to or quicker than the total time indicated by the above kind of messages now.

Quoted 6 lines
Quoted 4 lines

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Kumagai-san should decide this.

Ok, thanks a lot for testing and information. Kumagai-san is on vacation till sept 30. So I will wait for the response.

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw

Hello,

Quoted 54 lines
Quoted 39 lines
Quoted 39 lines
Quoted 20 lines

Hi Atsushi san,

We tried makedumpfile 1.5.0 on a 1TB machine and it seems to regress badly. We reserved 192MB of memory and following are test results.

#1. makedumpfile-1.4.2 -E --message-level 1 -d 31
real 3m47.520s
user 0m56.543s
sys 2m41.631s

#2. makedumpfile-1.5.0 -E --message-level 1 -d 31
real 52m25.262s
user 32m51.310s
sys 18m53.265s

#3. makedumpfile-1.4.2 -c --message-level 1 -d 31
real 8m49.107s
user 4m34.180s
sys 4m8.691s

Quoted 5 lines

#4. makedumpfile-1.5.0 -c --message-level 1 -d 31
real 46m48.985s
user 29m35.203s
sys 16m43.149s

Hello Vivek,

On v1.5.0 we cannot filter free pages in constant space becuase we have yet to test it. Instead, the existing method is used here, which repeats walking on a whole page frames the number of cycles times.

As Kumagai-san explains, the number of cycles can be calculated by the following expression:

N = physical memory size / (page size * bit per byte(8) * BUFSIZE_CYCLIC)

So,

Quoted 7 lines
Quoted 4 lines

N = 2TB / (4KB * 8 * 1MB) = 64 cycles.

I guess on this environment, it took about 50 seconds to filter free pages in one cycle.

Ok, so once we have your walking through page struct patches in, hopefully this problem will be gone?

Yes, then free page filtering is integrated in other mem_map array logics. You can see how it takes from the following message.

Excluding unnecessary pages : [100 %] STEP [Excluding unnecessary pages] : 0.204574 seconds

New logic takes equal to or quicker than the total time indicated by the above kind of messages now.

Quoted 6 lines
Quoted 4 lines

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Kumagai-san should decide this.

I'm not planning to make the cyclic mode optional.
However, I think the performance issue should be improved even without mem_map array logic.

So, I will try to reduce the number of cycles as few times as possible for v1.5.1, the performance issue will be improved.
To make sure of it, would you re-test with --cyclic-buffer 32768 (32MB), Vivek ? Then the result of v1.5.0 is still too bad, I will consider using the old logic as default logic.

Quoted 3 lines

BTW, Kumagai-san, in what version do you plan release of this new mem_map logic? Around v1.5.2? I want to re-send a new patch set to which I add small changes and comments for maintainability.

Yes, I plan to merge it in v1.5.2.
Would you re-send the new patch set based on v1.5.1 ?

Additionally, I'm afraid that I haven't reviewed the most of patches for v1.5.1 yet. So I can't tell you when v1.5.2 will be released.

Thanks
Atsushi Kumagai

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#7 lore raw

On Wed, Oct 03, 2012 at 04:38:35PM +0900, Atsushi Kumagai wrote:

[..]

Quoted 11 lines
Quoted 6 lines
Quoted 4 lines

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Kumagai-san should decide this.

I'm not planning to make the cyclic mode optional.
However, I think the performance issue should be improved even without mem_map array logic.

Quoted 5 lines

So, I will try to reduce the number of cycles as few times as possible for v1.5.1, the performance issue will be improved.
To make sure of it, would you re-test with --cyclic-buffer 32768 (32MB), Vivek ? Then the result of v1.5.0 is still too bad, I will consider using the old logic as default logic.

Actually chaowang did the testing. In the bug he provided data for 16MB buffer.

makedumpfile with 16M cyclic buffer,
#1. makedumpfile-1.5.0 -c --message-level 1 -d 31 --cyclic-buffer 16384

real     12m51.886s
user     6m30.710s
sys      6m11.642s
#2. makedumpfile-1.5.0 -E --message-level 1 -d 31 --cyclic-buffer 16384
real     11m24.141s
user     4m25.897s
sys      6m38.116s

Which looks much better than default numbers. Chao, can you please do the testing with 32MB buffer size and provide the data here.

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#9 lore raw
In reply to Atsushi Kumagai

From: Atsushi Kumagai <[email protected]>
Subject: Re: makedumpfile 1.5.0 takes much more time to dump
Date: Wed, 3 Oct 2012 16:38:35 +0900
<cut>

Quoted 7 lines
Quoted 3 lines

BTW, Kumagai-san, in what version do you plan release of this new mem_map logic? Around v1.5.2? I want to re-send a new patch set to which I add small changes and comments for maintainability.

Yes, I plan to merge it in v1.5.2.
Would you re-send the new patch set based on v1.5.1 ?

Yes, I'll do so.

Quoted 3 lines

Additionally, I'm afraid that I haven't reviewed the most of patches for v1.5.1 yet. So I can't tell you when v1.5.2 will be released.

Please tell me that later when you figure out.

Thanks.
HATAYAMA, Daisuke

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#8 lore raw
In reply to Vivek Goyal

From: Vivek Goyal <[email protected]>
Subject: Re: makedumpfile 1.5.0 takes much more time to dump
Date: Wed, 3 Oct 2012 08:48:13 -0400

Quoted 33 lines · Atsushi Kumagai

[..]

Quoted 11 lines
Quoted 6 lines
Quoted 4 lines

If that's going to take time, can we make using of new logic conditional on a command line option. So that user has the option of using old logic.

Kumagai-san should decide this.

I'm not planning to make the cyclic mode optional.
However, I think the performance issue should be improved even without mem_map array logic.

Quoted 5 lines

So, I will try to reduce the number of cycles as few times as possible for v1.5.1, the performance issue will be improved.
To make sure of it, would you re-test with --cyclic-buffer 32768 (32MB), Vivek ? Then the result of v1.5.0 is still too bad, I will consider using the old logic as default logic.

Actually chaowang did the testing. In the bug he provided data for 16MB buffer.

makedumpfile with 16M cyclic buffer,
#1. makedumpfile-1.5.0 -c --message-level 1 -d 31 --cyclic-buffer 16384

real     12m51.886s
user     6m30.710s
sys      6m11.642s
#2. makedumpfile-1.5.0 -E --message-level 1 -d 31 --cyclic-buffer 16384
real     11m24.141s
user     4m25.897s
sys      6m38.116s
Quoted 3 lines

Which looks much better than default numbers. Chao, can you please do the testing with 32MB buffer size and provide the data here.

This 32MB setting is identical to the old logic in 1TB case except that the cyclic buffer is on memory, not treated via temporary file. So, free list filtering is done at most 1 time even on the worst case. But it's necessary to specify proper sizes for dumpfiles of other sizes.

Thanks.
HATAYAMA, Daisuke

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec