O PostgreSQL executa no Windows e no Linux?

1

Este tópico foi criado em 2011, e o consenso era que havia considerações de design que dariam ao PostgreSQL uma vantagem sobre o Linux. Agora é 2015, isso mudou? Se há coisas que tornam o PostgreSQL mais lento no Windows, alguém pode resumir esses pontos?

    
por jackbean818 11.03.2015 / 15:47

1 resposta

3

Se os pontos que coloco nesta resposta forem atendidos, eu diria que o PostgreSQL ainda funciona razoavelmente bem com o Windows. Comparando com o ano de 2011, não vejo grande diferença.

Da minha experiência, é principalmente sobre tomar cuidado para que nenhum processo do Windows fique no caminho , então esta citação do livro Alta Performance do PostgreSQL 9.0 (2010) ainda se sustenta:

Unpredictable performance and Windows

Serious database administrators have a strong historical bias toward using UNIX-like systems for their servers. The first examples here are using Windows instead because the graphs produced are easier to read, and therefore better for introducing the concepts of this section. But doing so reminded me why Windows is not the preferred database hosting operating system of so many people.

Getting useful benchmark results requires the system be quiescent: free of other programs running that would spoil the results of what is intended to be measured. When booting into Windows Vista to generate these results, I discovered the TrustedInstaller process was hogging a considerable amount of CPU and disk resources. It turned out Windows Update had decided it was time to install the next major Vista Service Pack; it was downloading pieces in the background, and pushing me toward the upgrade at every opportunity. It was two hours later before I had completed all the background activity it compelled me to take care of, and had an idle system capable of running these tests.

Você pode pensar que favorecer a edição Server Core do Windows 2012 pode remediar isso um pouco. Artigo do MSDN Por que o Server Core Useful? (sobre o Windows 2008) diz:

Before we look at the benefits of Server Core, let's debunk a misconception: Improved performance is not one of the benefits of running Server Core instead of a Full installation of Windows Server 2008.

Além disso, o manuseio da memória também é diferente no Windows e, às vezes, é contra-intuitivo. Isso também é o mesmo de 2011. Por exemplo, o shared_buffers (de Documentação do PostgreSQL - 18.4 Consumo de Recursos :

on Windows, large values for shared_buffers aren't as effective. You may find better results keeping the setting relatively low and using the operating system cache more instead. The useful range for shared_buffers on Windows systems is generally from 64MB to 512MB.

    
por 11.03.2015 / 18:33