Performance: native MariaDB v. 'Docker'ized' PostgreSQL


#1

In your informed estimate, which database should give tt-rss better performance: MariaDB run natively or PostreSQL run as a Docker container?

I know that Andrew endorses PostreSQL and I’d be glad to go that way, but I can install PostreSQL only in Docker. Will the virtualisation overhead steal that database’s speed advantage over Maria?


#2

Running a database in docker is a horrible idea.
Don’t do it.

Read this https://thehftguy.com/2016/11/01/docker-in-production-an-history-of-failure/

I had to deal with this shit at work and it was a true nightmare.


#3

Docker containers do not have a CPU virtualization overhead.
If you’re mounting a host directory as the store location for the Postgres container, then there is no storage overhead.
The only thing that might be an overhead is the networking stack.

tl;dr: Go ahead and docker-ize it.
Use this if it helps: https://github.com/uvatbc/docker-ttrss


#4

WHY? (several more why’s to get past the nanny 20 character minimum)


#5

Because Synology®. I’m trying to install tt-rss on a NAS by that brand, and the manufacturer doesn’t allow users to install PostgreSQL: the NAS already sports an instance of PostgreSQL reserved for its internal use. The only official package is MariaDB.


#6

Thanks! Will read the saga after leaving the forum. My gut feeling is that Docker brings a level of complexity with it.


#7

Thanks for the encouragement. Curious, how your optimism contrasts with the previous poster’s caution. I understand that Docker is a polarising topic in developer circles.


#8

My optimism comes out of actually using Docker, knowing the inner details of the source, being aware of what it can do (as opposed to what the hype claims: “alternative to VMs”).

If you want to use it, go ahead. If you don’t, then don’t.
If you want help, I’ll help if I can.
But I don’t want to waste my time defending Docker or providing any counterpoints to any arguments.

rant:
That blog post has its moments of truth.
But then it adds mountain of FUD around everything. By the end of it, I felt like I’m being trolled!
"Docker is the devil and will eat your kittens and shit in your bed."
What crap!

Docker is a tool… like a hammer.
Like that hammer, I can put it to good use, or bludgeon my thumb and then complain how the hammer was just bad for humanity.
/rant


#9

a little googling results in quite a few people that’ve conquered that reason, whether that’s good enough for you or not, that’s up to you:

http://forum.idimager.com/viewtopic.php?t=23615

there’s others.


#10

as long as you’re not trying to keep actual data inside the container (which would be tremendously stupid) i think postgres would run fine in docker.

also, at least some of the issues discussed in the linked post above are obsolete (i.e. there’s docker prune now, etc).


#11

Ha! Didn’t see those. I limited my searches to the Synology forum. Will keep those posts for reference. Thanks, Sleeper.

Frankly, for now I’d rather keep my tt-rss setup as simple as possible. If I hack into Synology’s Postgres now, I may see my tt-rss broken by the next firmware update. It’s just not worth it. Better let the NAS do its thing (store files), and host tt-rss on my Debian VPS. To each his own. Also if I ever need your help, you guys won’t boot me out to ‘Unsupported platforms’. :wink: