on 2018 Jan 24 8:39 AM
I'm in the process of moving an ASA10 DB on Linux from a bare metal machine into a VM on a cloud-based host (a pretty powerful machine). This is using VirtualBox 5.2.6 64 bit.
They're both 64 bit and have 16G RAM (BM) 32G RAM (VM)
It does work, but I'm finding that dbbackup is VERY slow on the VM compared to the bare metal. (It would take about an hour on VM compared with 3 minutes on BM)
The disk access (as measured by copying a large file) is twice as fast on the VM.
I've not measured performance of intense updates yet, but get the impression that general performance (eg. counting the number of rows of a large table) is OK.
Any ideas on what I might try to diagnose this?
Request clarification before answering.
OK, so I have the answer!
It's nothing to do with Virtualisation.
It's nothing to do with RAM
It's nothing to do with CPU
It's nothing to do with Disk type
It's all about the Linux (kernel?) version.
It flies on Ubuntu 12.04 (whether VM or BM), but runs like a dog on Ubuntu 16.04 or Debian 9. I've not tried it on Ubuntu 14.04. Presumably this (old) code relied on certain OS features that have been deprecated, or somehow emulated, in more recent versions.
I know this is unsafe to run on Public IP, but the machine is behind a firewall with only our own webservers able to access it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh! I was waiting for this answer, but haven't expected it. This is all about melt-whatever fixes. Now every single DB will tell you that the performance is worse than before, because of this bug fix 🙂
I don't even know if you're joking!
You know, I'm beginning to think that these SSD drives might actually be slower for writing. Maybe the copy test was only faster because the reading part was so quick???
Just ran dd and it looks like write speed is not an issue:
dd if=/dev/zero of=/tmp/test2.img bs=1G count=1 oflag=dsync 1+0 records in 1+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.52853 s, 304 MB/s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I installed ASA10 on the host machine (and shut down the VM).
Interestingly, that is very slow on the backup too (est 70 mins) I see 95-99% CPU load for dbsrv10 and 52% for dbbackup here.
When doing the backup on the old BM, I see CPU of 64% for dbsrv10 and 42% for dbbackup.
Not sure what this is telling me, though!
The old machine was running Ubuntu 12.04 and the new one is Debian 9 (both 64 bit). Might this be the difference?!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is more interesting 🙂 It seems that dbbackup is doing something expensive for CPU resources, or... it could be also the case: CPU goes up to 99%, in case if you do not have enough CPU resources 🙂
I know a theory a little bit and thus I'd ask you to try profiling one of the processes. Hopefully you can identify the most expensive commands.
According to your test result from above, this is not a pure I/O issue. I assume that 99% is the User time, so this means a real "calculation" task.
Maybe developers can assist you with this question. I know that dbbackup is a black-box, and I will not be surprised that it is a single-threaded application.
I am sorry, I cannot help you better.
See below for output of report
That high ranking of "swapper" to someone with a little knowledge hints at page thrashing...
Alex, if I am not mistaken, perf is doing so-called "sampling". So it measures and aggregates API calls every portion of time. E.g. here you can find different parameters to show what your process is doing.
When I was working with dbbackup16 (or maybe even 17), I found out that this utility is pretty simple and either it works, or not.
As I said, with perf you can try to understand what it does under the hood. But I do not know much how :( E.g. flaming graphs can be helpful to find CPU intensive calls for both processes.
Who knows, maybe since dbsrv has to go through all records in the DB file (full table scan) to send them to dbbackup, this is where you lose the performance, and hopefully the large cache size can help you with it.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.