Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPShm-0001ij-1s for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 15:47:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPShk-00053N-W5 for pgsql-general@arkaria.postgresql.org; Mon, 05 Oct 2020 15:47:12 +0000 Resent-Date: Mon, 05 Oct 2020 15:47:12 +0000 Resent-Message-Id: Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPShk-00053B-Mx for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 15:47:12 +0000 Received: from mail.am-soft.de ([83.218.36.120]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPShi-0005lQ-1e for pgsql-general@lists.postgresql.org; Mon, 05 Oct 2020 15:47:12 +0000 Received: from mail.am-soft.de (localhost [127.0.0.1]) by mail.am-soft.de (Postfix) with ESMTP id 13D822F9098C for ; Mon, 5 Oct 2020 17:47:09 +0200 (CEST) Received: from tschoening-nb.fritz.box (unknown [77.78.163.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.am-soft.de (Postfix) with ESMTPSA id E16ED2F9098A for ; Mon, 5 Oct 2020 17:47:07 +0200 (CEST) X-Original-To: ams_tschoening@localhost.am-soft.de Delivered-To: ams_tschoening@localhost.am-soft.de Received: from mail.am-soft.de (localhost [127.0.0.1]) by mail.am-soft.de (Postfix) with ESMTP id B03CC2F90328 for ; Mon, 5 Oct 2020 17:15:13 +0200 (CEST) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.am-soft.de (Postfix) with ESMTPS id 69D072F90321 for ; Mon, 5 Oct 2020 17:15:12 +0200 (CEST) Received: by mail-qk1-f174.google.com with SMTP id y198so5941675qka.0 for ; Mon, 05 Oct 2020 08:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=9sMyUG8irZxdN5Jf5AzE/PTstiCc6AZvtF1THTYBeM4=; b=mf6BcRadVf9ccvEfuRIWacljhRKWQBGBkX4EzUMyhd5T2WxDDuaFkj9lqrmRktjegG 5JZWadsz7jUdh/aOSA2U2hYcHo5zMrwa+78Cs9ZOHkIhVApICBTyIC3Axqpt6WoMnk48 B13noBpKOpUFw+N0nq6H+WLOd51kSbAOm0mpjJJ7I7ImRTGibEj3R5a9UMEXZvYO8oME O5/2yvv2W2qsVLhSs/GIyY5biZVChIIToAHguEjvIi0uvdWQnFOs6H33lqKDrJjD+c15 4D7Ups+tQbBJ+24rLY218mKWqN/r3H3k0ZslWRW9AKkQzBvcBqUNE5lK/1lwFpU+tqqu 9kIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=9sMyUG8irZxdN5Jf5AzE/PTstiCc6AZvtF1THTYBeM4=; b=iPRKBn20ztD3gF3ZBed/iBxhqjcMsWqYsKrrqog6UduUBPaMQ8nqrt6BWtuNfkmQVO VqmYlWHmtdjGAYBYWV+cmWP8/qKVkA1vmWIvYoc6HxXKKPlrMaQ4UzeesQeCyyLhJrQj gO+MlSOoPWWERigH284x3O6eIUwlH2A84FcKouyjdKfAhPTKrY87r5nDBQM+Nuej7lCS aPS4TS4bkbdknxhgt1I986MmHhrHJW/A1BwiIg1yfEH4LdJWtcu9/Oo0zK2j/dpGugcC c3sOtBTgEPyVltQNu88hBKnXTU2B87z1WHGlmnws3hXj/ZgQA7OoYYtDA1bFdzUBlNn6 VFEg== X-Gm-Message-State: AOAM5308WIv0SiQH64suK3I06J71V34p+4ezjZsz6i2q5329cvXzeSBW OLkE7OrHwhROPuaV5BO8s5f7GyEJNG8= X-Google-Smtp-Source: ABdhPJyZPOFv5sTkwN785xKYEnJsfU4wvlvjp4NC4udFqnG0Ubu83X9I+nnJWX/7QRzlrU81gGRaCw== X-Received: by 2002:a37:4a57:: with SMTP id x84mr315909qka.17.1601909480358; Mon, 05 Oct 2020 07:51:20 -0700 (PDT) Received: from [192.168.7.150] ([190.177.104.254]) by smtp.gmail.com with ESMTPSA id x13sm179015qkh.65.2020.10.05.07.51.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Oct 2020 07:51:19 -0700 (PDT) From: Diego X-Google-Original-From: Diego Subject: Re: What's your experience with using Postgres in IoT-contexts? To: pgsql-general@lists.postgresql.org References: <544670224.20201005112020@am-soft.de> Message-ID: <4bc3ebc4-2307-7b64-d0db-1d2b4d10c9a5@gmail.com> Date: Mon, 5 Oct 2020 11:51:17 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <544670224.20201005112020@am-soft.de> Content-Type: multipart/alternative; boundary="------------089C148E5F089AEA0D566EC6" Content-Language: en-US X-AV-Checked: ClamAV using ClamSMTP Resent-From: tschoening@am-soft.de X-AV-Checked: ClamAV using ClamSMTP List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --------------089C148E5F089AEA0D566EC6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit I use pg in my raspberrypy 3b, for a weather station and works fine, but to be honest, I have a sencond raspi with a pgbouncer and a pendrive of 256GBs as data storage In other, I have a zabbix server with pg monitoring aboutn 100 devices, but with an external hdd. but, at the end of the day, I think is not the best idea. On 2020-10-05 06:20, Thorsten Schöning wrote: > Hi all, > > TL;DR: > > Does anyone actually use Postgres with ARM based low performance > hardware and only 256 MiB of RAM? What are your experiences in other > stripped down environments? Is there some lower RAM limit with which > using Postgres doesn't make any sense anymore? Is Postgres able to > compete with SQLite regaridng lower performance boundaries or is there > some point at which SQLite will be the better choice, because Postgres > needs some more resources to work properly? > > Thanks! > > Background: > > I have some server side backend exposing web services and storing data > in Postgres. The stored data are telegrams from smart metering > devices, lots of them, mostly small. The provided web services take > care of generating reports etc. based on those telegrams. > > It's now considered to put large parts of that backend onto some ARM > based IoT device, simply because that device would do a lot of the > same things. The available backend is Java-based, so it would simply > be possible as well and I already ran things on some Raspi-like > hardware and things worked pretty well. OTOH, the targetted hardware > is less capable than some Raspi, we talk about only 256 MiB of RAM > currently. The exact details of the hardware are not clear yet. > > In the easiest case, the newly created device would only need to store > some hundreds of telegrams per day in some known time window and > forward those telegrams afterwards. In most cases it would be those of > the same day only, but might be those of the last X few days as well > in case of problems. In the long term, though, that device should be > able to store telegrams for years and might generate reports on it's > own as well. > > I've already found some interesting infos like the following, but > would be interested in other expereinces as well. > > https://www.postgresql.eu/events/pgconfeu2019/sessions/session/2781/slides/251/PostgreSQL%20for%20IoT.pdf > > Mit freundlichen Grüßen, > > Thorsten Schöning > --------------089C148E5F089AEA0D566EC6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

I use pg in my raspberrypy 3b, for a weather station and works fine, but to be honest, I have a sencond raspi with a pgbouncer and a pendrive of 256GBs as data storage

In other, I have a zabbix server with pg monitoring aboutn 100 devices, but with an external hdd.

but, at the end of the day, I think is not the best idea.


On 2020-10-05 06:20, Thorsten Schöning wrote:
Hi all,

TL;DR:

Does anyone actually use Postgres with ARM based low performance
hardware and only 256 MiB of RAM? What are your experiences in other
stripped down environments? Is there some lower RAM limit with which
using Postgres doesn't make any sense anymore? Is Postgres able to
compete with SQLite regaridng lower performance boundaries or is there
some point at which SQLite will be the better choice, because Postgres
needs some more resources to work properly?

Thanks!

Background:

I have some server side backend exposing web services and storing data
in Postgres. The stored data are telegrams from smart metering
devices, lots of them, mostly small. The provided web services take
care of generating reports etc. based on those telegrams.

It's now considered to put large parts of that backend onto some ARM
based IoT device, simply because that device would do a lot of the
same things. The available backend is Java-based, so it would simply
be possible as well and I already ran things on some Raspi-like
hardware and things worked pretty well. OTOH, the targetted hardware
is less capable than some Raspi, we talk about only 256 MiB of RAM
currently. The exact details of the hardware are not clear yet.

In the easiest case, the newly created device would only need to store
some hundreds of telegrams per day in some known time window and
forward those telegrams afterwards. In most cases it would be those of
the same day only, but might be those of the last X few days as well
in case of problems. In the long term, though, that device should be
able to store telegrams for years and might generate reports on it's
own as well.

I've already found some interesting infos like the following, but
would be interested in other expereinces as well.

https://www.postgresql.eu/events/pgconfeu2019/sessions/session/2781/slides/251/PostgreSQL%20for%20IoT.pdf

Mit freundlichen Grüßen,

Thorsten Schöning

--------------089C148E5F089AEA0D566EC6--