How to benchmark / test the speed of MySQL, Postgresql, MongoDB, where there are so many cache layers around? -
I think that with SQLite3, at least it does not contain any cached page because there is no server and every Writing will exit SQLite3, so it can not directly do any caching.
But when it is MySQL, PostGraceCal or Mangodebi, there will be a layer, when the data will be saved already, it is actually DBMS's memory cache ... to be written later on the disk .
And even when written on disk, there is an OS layer that keeps the areas written on the disk.
And then the hard drive's cache. With this being 8 MB, this can happen when the data is being put to create an 800 MB database in the test, the error can be 1% or less.
But what about the other layers? There really needs to be flushing all the way to the OS layer; Otherwise, with 4 GB RAM or 8 GB RAM computers, the whole database can easily stay in RAM, when it is thought quite quickly. How can we ask the test to flush data from the hard disk physical layer or at least the OS layer in every way?
When you are doing benchmarking, you can never deny all the speed optimization at all levels, including canning at the OS or at the CPU level . You do not need it. What you can do to benchmark performance in different lifecycle states of your system. In addition, if you know which data is cached (almost) you can benchmark it before and after it, for example - clean start, use of first DB dataset, later DB access, etc. First of all, it would be best to establish these constraints and then the benchmark will be in more detail. Another good practice is to load a real life system and simulate the benchmark. Any syntax standard is practically useless good luck;)
Comments
Post a Comment