health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Performance Tuning


From: Khurram Shahzad
Subject: Re: [Health] Performance Tuning
Date: Sat, 10 Dec 2016 16:46:31 +0500

Dear Luis,

I have created the new database and ran the same command to see its collate:
 Name           |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
--------------------------+-----------+----------+-------------+-------------+-----------------------
 Production_n | postgres  | UTF8     | C           | C           |

I can see that the Collate and Ctype are just like those you suggested.

I did not delete the old database yet. Is't it good to keep the old db with different name? Also, is it fine if I rename the new database and give it name of the old database so that I can avoid changing database name on all my clients?

Regards,
Khurram.

On Sat, Dec 10, 2016 at 11:40 AM, Khurram Shahzad <address@hidden> wrote:
Dear Luis,

Thank you so much for the response. I have run the query and got the following result:

           Name           |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
--------------------------+-----------+----------+-------------+-------------+-----------------------
 Production_Finalk   | gnuhealth | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

The result shows a different Collate and Ctype. Now, I am going to recreate the db as suggested by you. I will surely share the good results.

Best Regards,
Khurram.

On Sat, Dec 10, 2016 at 4:01 AM, Luis Falcon <address@hidden> wrote:
Dear Khurram
On Fri, 9 Dec 2016 18:18:12 +0500
Khurram Shahzad <address@hidden> wrote:

> Dear All,
>
> Our GNU Health implementation has been running for last 20 days. We
> have registered about 1500 patients, 1000 lab, radiology and IPD
> procedures and 17000 medicines.
>
> The server has four CPUs each with six cores and a 16 GB RAM running
> Ubuntu 15.10 Server.
>
> The problem we have started facing is the slow response. I don't see
> the server RAM usage going above 2.5 GB. I have set the shared_buffer
> of PostgreSQL to 6GB.
>
> What may be the possible cause behind it? How can I tune the Trytond
> process, if it require some performance tuning?
>
> Sometimes we have to wait for around 5 seconds after clicking on 'New'
> button on patients' list. Then another 4 seconds for 'create new
> party' form.
>
> Any suggestions/thoughts?
>

Seem you already tuned your DB buffers and other PG params.

Have you check the locale on your database system ?

The problem lies within sorting operations with different encoding.

It should be :

Encoding = "UTF8"
Collate = "C"
Ctype = "C"

Check the result you get in when typing "psql -l" command

It should be similar to this :

   Name    |  Owner   | Encoding | Collate | Ctype |
   -----------+----------+-------+---------+-------+-
   health32  | gnu    | UTF8   | C       | C       |


If you have another encoding / Collate / Ctype than the above , you can
recreate your DB using the right locale (Collate + Ctype)

Stop GNU Health / Tryton server.

$ pg_dump db_name.sql > db_name.sql
$ dropdb db_name (make sure you have a good backup !!)
$ createdb db_name --encoding=unicode --locale=C --template=template0
$ psql db_name < db_name.sql

Where db_name is the name of your database.

Restart the GNU Health / Tryton server

Let us know if this worked.

Bests

--
Dr. Luis Falcon, M.D., BSc
President, GNU Solidario
GNU Health: Freedom and Equity in Healthcare
http://health.gnu.org




--
 
Regards,
Khurram.



--
 
Regards,
Khurram.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]