Performance testing
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Mixing performance with regressions tests wouldn't be a good idea, so I thought about creating another category on the main level of tests (something like xfstests/tests/performance). Or it would be better to put it into entirely new directory, like xfstests/performance?
Quoted 1 line
From the beginning there would be some basic test cases, like sync/async
read and write. Hopefully more natural cases, like a database server would be added later. For the IO testing, I want to use FIO for the specific workflow and eventually iozone for the basic synthetic tests.
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
Comments and questions? :-)
Jan Tulak
Quoted 26 lines · Jan Tulak
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Mixing performance with regressions tests wouldn't be a good idea, so I thought about creating another category on the main level of tests (something like xfstests/tests/performance). Or it would be better to put it into entirely new directory, like xfstests/performance?
From the beginning there would be some basic test cases, like sync/async read and write. Hopefully more natural cases, like a database server would be added later. For the IO testing, I want to use FIO for the specific workflow and eventually iozone for the basic synthetic tests.
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
Quoted 1 line
Comments and questions? :-)
This kind of functionality already implemented in autotest via perf keyval
http://autotest.readthedocs.org/en/latest/main/local/Keyval.html
test case may produce any numbers of keyvalues which will be automatically stored to standard database for later comparison.
Quoted 8 lines
Jan Tulak
--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Dmitry Monakhov
Quoted 2 lines · Jan Tulak
Comments and questions? :-)
This kind of functionality already implemented in autotest via perf keyval
http://autotest.readthedocs.org/en/latest/main/local/Keyval.html
test case may produce any numbers of keyvalues which will be automatically stored to standard database for later comparison.
Thanks for the info. I think Autotest could be used as the upper layer, for saving and comparing the results. But I will need to look more on how it would works.
Cheers,
Jan Tulak
Quoted 12 lines
Quoted 8 lines
Jan Tulak
--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Jan Tulak
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Great idea, but I'm missing some context about your ultimate goal
here: how is this performance testing going to be used?
My focus for xfstests is mainly for it to be useful to filesystem developers who are developing new features and fixing bugs, so my comments come from the point of view of "will it make my life as a filesystem developer easier?" rather than a "we have need a performance test suites" perspective.
Quoted 4 lines
Mixing performance with regressions tests wouldn't be a good idea, so I thought about creating another category on the main level of tests (something like xfstests/tests/performance). Or it would be better to put it into entirely new directory, like xfstests/performance?
That depends. What infrastructure do you actually need from the xfstests harness? How much commonality are you expecting to use here? If there's no commonality (i.e. it's a completely separate set of infrastructure that only shares SCRATCH_DEV/SCRATCH_MNT) then I'd have to question whether xfstests is the right place for this functionality.
However, if it leverages all the same test template and execution methods, then having it as just another test subgroup (i.e. in tests/performance) would the right way to approach this.
Quoted 3 lines
From the beginning there would be some basic test cases, like sync/async read and write. Hopefully more natural cases, like a database server would be added later.
IMO, if we do add performance tests to xfstests, then the focus would definitely need to be on performance regression tests, not "performance benchmark" (aka benchmarketing) tests. If you want "performance benchmarks" then openbenchmarking.org is probably a better place to start as that is what it is designed for and already has everything you've mentioned.
So I'll focus on performance regression testing. Performance regression testing involves a lot more than just "run benchmark, save and compare results". It's once the "compare results" phase says "regression found" that the functionality of the test really matters to the filesystem develper. i.e. the tests need to be useful for *analysis of the regression*.
Hence things like "database server benchmark" don't really belong in a performance regression test suite because they can't be used to isolate regressions. Further, they tend to be susceptible to changes in performance being caused by changes outside filesystem and storage layers. Hence they lead to wild goose chases more often than they point to a real filesystem or IO regression.
Quoted 2 lines
For the IO testing, I want to use FIO for the
specific workflow and eventually iozone for the basic synthetic tests.
I think that the initial focus for performance regression tests would need to be more on simple micro-benchmarks (e.g. read, write, create, remove, etc). I'd much prefer to see simple, targeted benchmarks that are easily understood jus tby looking at the xfstests code. e.g. a patchset made unlink go fast, but slowed down file create. Or that we sped up single threaded creates, but destroyed multithreaded create scalability. Or that we sped up small directories at the expense of large directories. These things can all be measured individually (and quickly) and because they tend to measure a single aspect of filesystem performance they can be used directly for regression analysis.
Many of these sorts of tests can be written into the existing xfstests infrastructure without needing significant external dependencies - fio and fsmark cover most of the microbenchmarks that would be necessary. I already have quite a few scripts that I use to run fsmark tests that could easily be wrapped with xfstests templates....
As for IOZone, well, I'd suggest you don't bother with IOZone(*) because we can do far better with bash, dd and fio....
Quoted 7 lines
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
I don't think that storing results long term or comparing results is something xfstests should directly care about. It is architected to defer that to some external tool for post processing. i.e. xfstests is used to run the tests and generate results, not do long term storage or analysis of those results.
I see no issues with including scripts to do result processing across multiple RESULT_DIRs within xfstests itself, but the infrastructure still has to be architected so it can be externally controllable and usable by external test infrastructure.
Cheers,
Dave.
(*) IOZone is pretty much useless for performance regression *detection*, let alone be useful for analysis of regressions. Run-to-run variation of +/-10% is not uncommon or unexpected - it has a very low precision.
It requires extremely stale clocks for it's timing to be accurate, which means you have to be very careful about the hardware you use. This also rules out testing in VMs as the timing is simply too variable to be useful for accurate measurement. It also means that it's very difficult to reproduce the same results across multiple machines.
Worse is tha fact that it is also extremely sensitive to userspace and kernel CPU cache footprint changes. Hence a change that affects the CPU cache residency of the IOZone data buffer will have far more effect on the result than the actual algorithmic change to filesystem and IO subsystem that lead to the CPU cache footprint change. Hence the same test on two different machiens that only differ by CPU can give very different results - one might say "faster", the other can say "slower".
It's just not a reliable tool for IO performance measurement, which is kinda sad because that is it's sole purpose in life.....
Signature · 2 lines
Dave Chinner [email protected]
Quoted 9 lines · Dave Chinner
Quoted 7 lines · Jan Tulak
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Quoted 8 lines
Great idea, but I'm missing some context about your ultimate goal
here: how is this performance testing going to be used?My focus for xfstests is mainly for it to be useful to filesystem developers who are developing new features and fixing bugs, so my comments come from the point of view of "will it make my life as a filesystem developer easier?" rather than a "we have need a performance test suites" perspective.
I think there is a place for two kinds of these tests. One is a quick suite that should not run for more than few minutes and can be used whenever sending a patch (or on daily basis...) for a quick check, to catch bad things as soon as possible.
The other set would be for deeper and more complex and used rather between versions than single patches. This one maybe could be independent, but for consistency, I think it is better to keep both sets together.
Quoted 13 lines
Quoted 5 lines
Mixing performance with regressions tests wouldn't be a good idea, so I thought about creating another category on the main level of tests (something like xfstests/tests/performance). Or it would be better to put it into entirely new directory, like xfstests/performance?
That depends. What infrastructure do you actually need from the xfstests harness? How much commonality are you expecting to use here? If there's no commonality (i.e. it's a completely separate set of infrastructure that only shares SCRATCH_DEV/SCRATCH_MNT) then I'd have to question whether xfstests is the right place for this functionality.
Quoted 3 lines
However, if it leverages all the same test template and execution methods, then having it as just another test subgroup (i.e. in tests/performance) would the right way to approach this.
Yes, this is my intention - use the test template and these things, so it would look like another test, just it would measure performance.
Quoted 18 lines
Quoted 3 lines
From the beginning there would be some basic test cases, like sync/async read and write. Hopefully more natural cases, like a database server would be added later.
IMO, if we do add performance tests to xfstests, then the focus would definitely need to be on performance regression tests, not "performance benchmark" (aka benchmarketing) tests. If you want "performance benchmarks" then openbenchmarking.org is probably a better place to start as that is what it is designed for and already has everything you've mentioned.
So I'll focus on performance regression testing. Performance regression testing involves a lot more than just "run benchmark, save and compare results". It's once the "compare results" phase says "regression found" that the functionality of the test really matters to the filesystem develper. i.e. the tests need to be useful for *analysis of the regression*.
Quoted 7 lines
Hence things like "database server benchmark" don't really belong in a performance regression test suite because they can't be used to isolate regressions. Further, they tend to be susceptible to changes in performance being caused by changes outside filesystem and storage layers. Hence they lead to wild goose chases more often than they point to a real filesystem or IO regression.
This is not needed in the quick suite, but just testing simple read/write will not find regression appearing during some more complicated situations. If the only thing changed is the filesystem, any big difference in results can be attributed to the filesystem change. Right?
I do not expect everyone will run this test suite all day, but it could notice us about regressions between versions of a filesystem.
Quoted 16 lines
Quoted 3 lines
For the IO testing, I want to use FIO for the
specific workflow and eventually iozone for the basic synthetic tests.I think that the initial focus for performance regression tests would need to be more on simple micro-benchmarks (e.g. read, write, create, remove, etc). I'd much prefer to see simple, targeted benchmarks that are easily understood jus tby looking at the xfstests code. e.g. a patchset made unlink go fast, but slowed down file create. Or that we sped up single threaded creates, but destroyed multithreaded create scalability. Or that we sped up small directories at the expense of large directories. These things can all be measured individually (and quickly) and because they tend to measure a single aspect of filesystem performance they can be used directly for regression analysis.
Quoted 6 lines
Many of these sorts of tests can be written into the existing xfstests infrastructure without needing significant external dependencies - fio and fsmark cover most of the microbenchmarks that would be necessary. I already have quite a few scripts that I use to run fsmark tests that could easily be wrapped with xfstests templates....
The initial focus should really aim at this, I agree. Creating this quick and small suite should not take a long time. If you have something, that could be useful once I will create some kind of template for performance tests.
Quoted 3 lines
As for IOZone, well, I'd suggest you don't bother with
IOZone(*)because we can do far better with bash, dd and fio....
Thanks for the info. I did just some brief experiments with IOZone so far, so these things did eluded me.
Quoted 15 lines
Quoted 8 lines
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
I don't think that storing results long term or comparing results is something xfstests should directly care about. It is architected to defer that to some external tool for post processing. i.e. xfstests is used to run the tests and generate results, not do long term storage or analysis of those results.
Quoted 4 lines
I see no issues with including scripts to do result processing across multiple
RESULT_DIRswithin xfstests itself, but the infrastructure still has to be architected so it can be externally controllable and usable by external test infrastructure.
I expected something like this, so it shouldn't be a big trouble. What I see as a good way: at first to create some small tests. Then, once they works as intended, I can work on the external tool for managing the results, rather than at first creating the tool. That will also give me more time to find some good solution. (What I see, there is already some work with autotest running xfstest, so maybe it will needs just a little work to add the new tests.)
I hope I answered everything. :-)
Quoted 26 lines
Cheers,
Dave.
(*) IOZone is pretty much useless for performance regression *detection*, let alone be useful for analysis of regressions. Run-to-run variation of +/-10% is not uncommon or unexpected - it has a very low precision.
It requires extremely stale clocks for it's timing to be accurate, which means you have to be very careful about the hardware you use. This also rules out testing in VMs as the timing is simply too variable to be useful for accurate measurement. It also means that it's very difficult to reproduce the same results across multiple machines.
Worse is tha fact that it is also extremely sensitive to userspace and kernel CPU cache footprint changes. Hence a change that affects the CPU cache residency of the IOZone data buffer will have far more effect on the result than the actual algorithmic change to filesystem and IO subsystem that lead to the CPU cache footprint change. Hence the same test on two different machiens that only differ by CPU can give very different results - one might say "faster", the other can say "slower".
Quoted 2 lines
It's just not a reliable tool for IO performance measurement, which is kinda sad because that is it's sole purpose in life.....
Cheers,
Jan
Quoted 24 lines · Jan Tulak
Quoted 9 lines · Dave Chinner
Quoted 7 lines · Jan Tulak
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Quoted 8 lines
Great idea, but I'm missing some context about your ultimate goal
here: how is this performance testing going to be used?My focus for xfstests is mainly for it to be useful to filesystem developers who are developing new features and fixing bugs, so my comments come from the point of view of "will it make my life as a filesystem developer easier?" rather than a "we have need a performance test suites" perspective.
I think there is a place for two kinds of these tests. One is a quick suite that should not run for more than few minutes and can be used whenever sending a patch (or on daily basis...) for a quick check, to catch bad things as soon as possible.
Quoted 4 lines
The other set would be for deeper and more complex and used rather between versions than single patches. This one maybe could be independent, but for consistency, I think it is better to keep both sets together.
I'm not yet convinced, but keep talking ;)
Quoted 25 lines
Quoted 18 lines
Quoted 3 lines
From the beginning there would be some basic test cases, like sync/async read and write. Hopefully more natural cases, like a database server would be added later.
IMO, if we do add performance tests to xfstests, then the focus would definitely need to be on performance regression tests, not "performance benchmark" (aka benchmarketing) tests. If you want "performance benchmarks" then openbenchmarking.org is probably a better place to start as that is what it is designed for and already has everything you've mentioned.
So I'll focus on performance regression testing. Performance regression testing involves a lot more than just "run benchmark, save and compare results". It's once the "compare results" phase says "regression found" that the functionality of the test really matters to the filesystem develper. i.e. the tests need to be useful for *analysis of the regression*.
Quoted 7 lines
Hence things like "database server benchmark" don't really belong in a performance regression test suite because they can't be used to isolate regressions. Further, they tend to be susceptible to changes in performance being caused by changes outside filesystem and storage layers. Hence they lead to wild goose chases more often than they point to a real filesystem or IO regression.
Quoted 5 lines
This is not needed in the quick suite, but just testing simple read/write will not find regression appearing during some more complicated situations. If the only thing changed is the filesystem, any big difference in results can be attributed to the filesystem change. Right?
No. A change in a filesystem can causing things like more context switches to occur due to additional serialisation on a sleeping lock. A change of context switch behaviour can expose issuing in other subsystems, like the scheduler or even bugs in the locking code. This happens more frequently than you think...
Quoted 3 lines
I do not expect everyone will run this test suite all day, but it could notice us about regressions between versions of a filesystem.
It's rare that developers run tests directly comparing released versions of the kernel. We'll compare "unpatched vs patched" in back-to-back tests, so the tests we do run need to be cover a good portion of the performance matrix in a useful fashion....
Quoted 22 lines
Quoted 15 lines
Quoted 2 lines
For the IO testing, I want to use FIO for the
specific workflow and eventually iozone for the basic synthetic tests.I think that the initial focus for performance regression tests would need to be more on simple micro-benchmarks (e.g. read, write, create, remove, etc). I'd much prefer to see simple, targeted benchmarks that are easily understood jus tby looking at the xfstests code. e.g. a patchset made unlink go fast, but slowed down file create. Or that we sped up single threaded creates, but destroyed multithreaded create scalability. Or that we sped up small directories at the expense of large directories. These things can all be measured individually (and quickly) and because they tend to measure a single aspect of filesystem performance they can be used directly for regression analysis.
Quoted 6 lines
Many of these sorts of tests can be written into the existing xfstests infrastructure without needing significant external dependencies - fio and fsmark cover most of the microbenchmarks that would be necessary. I already have quite a few scripts that I use to run fsmark tests that could easily be wrapped with xfstests templates....
Quoted 4 lines
The initial focus should really aim at this, I agree. Creating this quick and small suite should not take a long time. If you have something, that could be useful once I will create some kind of template for performance tests.
I've attached an example script I use to run a file creation micro-benchmark.
What is important here is that once the files are created, I then run several more performance tests on the filesystem - xfs_repair performance, bulkstat performance, find and ls -R performance, and finally unlink performance.
So it's really 5 or 6 tests in one. We are going to need to be able to support such "sub-test" categories so that we don't waste lots of time having to create filesystem pre-conditions for various micro-benchmarks. Any ideas on how we could group tests like this so they are run sequentially as a group, but also can be run individually and correctly invking the setup test if the filesystem is not in the correct state?
Quoted 19 lines
Quoted 14 lines
Quoted 7 lines
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
I don't think that storing results long term or comparing results is something xfstests should directly care about. It is architected to defer that to some external tool for post processing. i.e. xfstests is used to run the tests and generate results, not do long term storage or analysis of those results.
Quoted 4 lines
I see no issues with including scripts to do result processing across multiple
RESULT_DIRswithin xfstests itself, but the infrastructure still has to be architected so it can be externally controllable and usable by external test infrastructure.
Quoted 7 lines
I expected something like this, so it shouldn't be a big trouble. What I see as a good way: at first to create some small tests. Then, once they works as intended, I can work on the external tool for managing the results, rather than at first creating the tool. That will also give me more time to find some good solution. (What I see, there is already some work with autotest running xfstest, so maybe it will needs just a little work to add the new tests.)
Yes, that seems like the sensible approach to take.
FWIW, I'm pretty sure most developers run xfstests directly, so I'd concentrate on making reporting work well for this case first, then concentrate on what extra functionality external harnesses like autotest require....
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 16 lines · Dave Chinner
Quoted 8 lines · Jan Tulak
Quoted 2 lines · Dave Chinner
On Wed, Sep 17, 2014 at 10:48:44AM +0200, Jan Tulak wrote:
...This is not needed in the quick suite, but just testing simple read/write will not find regression appearing during some more complicated situations. If the only thing changed is the filesystem, any big difference in results can be attributed to the filesystem change. Right?
No. A change in a filesystem can causing things like more context switches to occur due to additional serialisation on a sleeping lock. A change of context switch behaviour can expose issuing in other subsystems, like the scheduler or even bugs in the locking code. This happens more frequently than you think...
Quoted 9 lines
Quoted 3 lines
I do not expect everyone will run this test suite all day, but it could notice us about regressions between versions of a filesystem.
It's rare that developers run tests directly comparing released versions of the kernel. We'll compare "unpatched vs patched" in back-to-back tests, so the tests we do run need to be cover a good portion of the performance matrix in a useful fashion....
I can't argue about that. :-)
Quoted 16 lines
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
...
...
The initial focus should really aim at this, I agree. Creating this quick and small suite should not take a long time. If you have something, that could be useful once I will create some kind of template for performance tests.
I've attached an example script I use to run a file creation micro-benchmark.
What is important here is that once the files are created, I then run several more performance tests on the filesystem -
xfs_repairperformance, bulkstat performance, find and ls -R performance, and finally unlink performance.
Quoted 7 lines
So it's really 5 or 6 tests in one. We are going to need to be able to support such "sub-test" categories so that we don't waste lots of time having to create filesystem pre-conditions for various micro-benchmarks. Any ideas on how we could group tests like this so they are run sequentially as a group, but also can be run individually and correctly invking the setup test if the filesystem is not in the correct state?
One idea I thought about and didn't see big problems in existing infrastructure would be to add another level for tests. So there could be something like tests/something/001/001. Not specifying the last level would mean "every test in a sub-level".
Quoted 1 line
From what I saw, that would need some smaller changes in ./check script
and a mechanism for the sub-levels to share their environment. The mechanism could work as follows:
In a sub-level there would be an init script, invoked by the tests and used for setting the filesystem and other things. After first run, it would export a variable with its own file path/group name. On subsequent tests, the variable would already have the specified value, so no initialization would be done again, until another sub-level.
An alternative for the mechanism would be to really check if the filesystem is in required state, but this seems to me like a test in a test (in a test...) :-)
Quoted 15 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
...
......
Quoted 7 lines
I expected something like this, so it shouldn't be a big trouble. What I see as a good way: at first to create some small tests. Then, once they works as intended, I can work on the external tool for managing the results, rather than at first creating the tool. That will also give me more time to find some good solution. (What I see, there is already some work with autotest running xfstest, so maybe it will needs just a little work to add the new tests.)
Quoted 6 lines
Yes, that seems like the sensible approach to take.
FWIW, I'm pretty sure most developers run xfstests directly, so I'd concentrate on making reporting work well for this case first, then concentrate on what extra functionality external harnesses like autotest require....
Yes, exactly.
Cheers,
Jan
Hi,
I have done some work on the pre-conditions for tests to share some setup recently (like making the FS almost full... I'm using word "environment" as name for it). It is not yet fully implemented, but I have found some things where I'm uncertain what solution to use.
So at first how it works:
There is a new file "environment" on the same level as a "group" file in tests directory. This file has the same syntax as "group". For setting up the environment for a test, there is also a file named "environment-NAME", where NAME is the name of the setup from the first file - something like a group name.
Tests are sorted by the environment name, so if they do not need to reset the environment pre-conditions, the setup script is run just one.
Here is the unsure part: Currently I have the environments on same level as groups, but that means that it can't be shared between (for example) general/001 and xfs/001 tests. I can move it somewhere else, so either full environments settings, or just the setup scripts can be shared between the categories. Is there a strong reasoning why to choose one or the other option? If not, I think I will keep the "environment" file on same level as "group", but will share the setup scripts.
Also, because one test can be in multiple environments, the test can be run multiple times. Because of this, I wonder if all the functionality should be enabled explicitly, as a flag to ./check script. (No environment preparations until requested). It is not changing anything if the test is not explicitly placed into the "environment" file.
Thanks.
Cheers,
Jan
Quoted 158 lines · Dave Chinner
Quoted 24 lines · Jan Tulak
Quoted 9 lines · Dave Chinner
Quoted 7 lines · Jan Tulak
Hi,
I have began to work on some set of performance tests. I think it would be useful to have some standard set, because as far as I know, there is just little of performance testing and every of the few tests someone does is unique. I want to propose my ideas before I start to really write it, to fix possible complications.
Quoted 8 lines
Great idea, but I'm missing some context about your ultimate goal
here: how is this performance testing going to be used?My focus for xfstests is mainly for it to be useful to filesystem developers who are developing new features and fixing bugs, so my comments come from the point of view of "will it make my life as a filesystem developer easier?" rather than a "we have need a performance test suites" perspective.
I think there is a place for two kinds of these tests. One is a quick suite that should not run for more than few minutes and can be used whenever sending a patch (or on daily basis...) for a quick check, to catch bad things as soon as possible.
Quoted 4 lines
The other set would be for deeper and more complex and used rather between versions than single patches. This one maybe could be independent, but for consistency, I think it is better to keep both sets together.
I'm not yet convinced, but keep talking ;)
Quoted 25 lines
Quoted 18 lines
Quoted 3 lines
From the beginning there would be some basic test cases, like sync/async read and write. Hopefully more natural cases, like a database server would be added later.
IMO, if we do add performance tests to xfstests, then the focus would definitely need to be on performance regression tests, not "performance benchmark" (aka benchmarketing) tests. If you want "performance benchmarks" then openbenchmarking.org is probably a better place to start as that is what it is designed for and already has everything you've mentioned.
So I'll focus on performance regression testing. Performance regression testing involves a lot more than just "run benchmark, save and compare results". It's once the "compare results" phase says "regression found" that the functionality of the test really matters to the filesystem develper. i.e. the tests need to be useful for *analysis of the regression*.
Quoted 7 lines
Hence things like "database server benchmark" don't really belong in a performance regression test suite because they can't be used to isolate regressions. Further, they tend to be susceptible to changes in performance being caused by changes outside filesystem and storage layers. Hence they lead to wild goose chases more often than they point to a real filesystem or IO regression.
Quoted 5 lines
This is not needed in the quick suite, but just testing simple read/write will not find regression appearing during some more complicated situations. If the only thing changed is the filesystem, any big difference in results can be attributed to the filesystem change. Right?
No. A change in a filesystem can causing things like more context switches to occur due to additional serialisation on a sleeping lock. A change of context switch behaviour can expose issuing in other subsystems, like the scheduler or even bugs in the locking code. This happens more frequently than you think...
Quoted 3 lines
I do not expect everyone will run this test suite all day, but it could notice us about regressions between versions of a filesystem.
It's rare that developers run tests directly comparing released versions of the kernel. We'll compare "unpatched vs patched" in back-to-back tests, so the tests we do run need to be cover a good portion of the performance matrix in a useful fashion....
Quoted 22 lines
Quoted 15 lines
Quoted 2 lines
For the IO testing, I want to use FIO for the
specific workflow and eventually iozone for the basic synthetic tests.I think that the initial focus for performance regression tests would need to be more on simple micro-benchmarks (e.g. read, write, create, remove, etc). I'd much prefer to see simple, targeted benchmarks that are easily understood jus tby looking at the xfstests code. e.g. a patchset made unlink go fast, but slowed down file create. Or that we sped up single threaded creates, but destroyed multithreaded create scalability. Or that we sped up small directories at the expense of large directories. These things can all be measured individually (and quickly) and because they tend to measure a single aspect of filesystem performance they can be used directly for regression analysis.
Quoted 6 lines
Many of these sorts of tests can be written into the existing xfstests infrastructure without needing significant external dependencies - fio and fsmark cover most of the microbenchmarks that would be necessary. I already have quite a few scripts that I use to run fsmark tests that could easily be wrapped with xfstests templates....
Quoted 4 lines
The initial focus should really aim at this, I agree. Creating this quick and small suite should not take a long time. If you have something, that could be useful once I will create some kind of template for performance tests.
I've attached an example script I use to run a file creation micro-benchmark.
What is important here is that once the files are created, I then run several more performance tests on the filesystem -
xfs_repairperformance, bulkstat performance, find and ls -R performance, and finally unlink performance.So it's really 5 or 6 tests in one. We are going to need to be able to support such "sub-test" categories so that we don't waste lots of time having to create filesystem pre-conditions for various micro-benchmarks. Any ideas on how we could group tests like this so they are run sequentially as a group, but also can be run individually and correctly invking the setup test if the filesystem is not in the correct state?
Quoted 19 lines
Quoted 14 lines
Quoted 7 lines
What I'm not sure is how a comparison between different versions could be done, because I don't see any infrastructure within fstests for cross-version comparison. (What would it do with regression tests anyway...) So I wonder if it should be done in this set at all. So the set would only print the measured values. Some other tool (which can be also included, but is not directly part of the performance tests set) could then be used to compare and/or plot graphs.
I don't think that storing results long term or comparing results is something xfstests should directly care about. It is architected to defer that to some external tool for post processing. i.e. xfstests is used to run the tests and generate results, not do long term storage or analysis of those results.
Quoted 4 lines
I see no issues with including scripts to do result processing across multiple
RESULT_DIRswithin xfstests itself, but the infrastructure still has to be architected so it can be externally controllable and usable by external test infrastructure.Quoted 7 lines
I expected something like this, so it shouldn't be a big trouble. What I see as a good way: at first to create some small tests. Then, once they works as intended, I can work on the external tool for managing the results, rather than at first creating the tool. That will also give me more time to find some good solution. (What I see, there is already some work with autotest running xfstest, so maybe it will needs just a little work to add the new tests.)
Yes, that seems like the sensible approach to take.
FWIW, I'm pretty sure most developers run xfstests directly, so I'd concentrate on making reporting work well for this case first, then concentrate on what extra functionality external harnesses like autotest require....
Cheers,
Dave.