Currently using bitcoind 0.11 headless on Debian (although had the same issue with all previously bitcoind versions).
The wallet info: Wallet.dat size: 160MB Number of addresses: ~16,000 Unspent outputs: (varies but around: 20-40)
Load on the server seems fairly low, and CPU usage is very low. Memory: 4GB load average: 0.39, 0.43, 0.35 Drive is SSD
“listunspent” function is extremely slow; and by extension this seems to affect getbalance and sendmany/sendtoaddress functions.
Here are some specific examples of this sluggishness:
0$ time /path/to/my/bitcoin/bitcoin-cli getbalance "" 3
1real 0m3.398s
2user 0m0.008s
3sys 0m0.004s
4
5$ time /path/to/my/bitcoin/bitcoin-cli listunspent
6real 0m4.213s
7user 0m0.008s
8sys 0m0.004s
The times are consistently 3-4 seconds every time
But then some commands are much quicker:
0$ time /path/to/my/bitcoin/bitcoin-cli getinfo
1real 0m0.039s
2user 0m0.004s
3sys 0m0.004s