Performance Upgrade, moving slowing install to v9

Hello @ganas et al, I’m starting the thread for this; for those who were not part of the previous thread I’ll just brief on it later. It’s past midnight so I’ll start sometime today and post my progress with the upgrade. Thanks.

1 Like

I feel your pain. Your efforts here would greatly help the community in understanding the performance issues. I have always wondered at what volume of transactions would break the performance of ERPNext? Wouldn’t it be easy for the devs at ERPNext to simulate this? Isn’t this normally done by any software company to stress test their code? What if this was already done and they know that the code has issues? Would they tell the community? Just food for thought.

Hoping your best outcome is to find the offending code in V9 and patch your V6.

Good Luck.

Like I said in the earlier post, setup slow query logs in mariadb and report the queries that need to be optimised.

Thanks; so good of you to join us Sir. I set this up and got nothing in the logs. Please offer any clues to getting the slow logs correctly set up. Thanks.

Create a clone snapshot of current live ERP before progressing.
If you run into too many upgrade issues please read my post in other topic.

Yes Sir. I read through, will do the exports and start mapping later today, and I have an appliance exported in ova format as a backup. What do you think about restoring a .sql file to v9? Because I want to drop the sql backup on the forums, maybe if someone can try it and guide me, that may be quicker. Else I’ll do your way.

we are also facing the same problem it becomes slow after recording is done for almost 10 months data,we have upgraded our server to Dell R730 with 32 gb RAM, core I7 8TB HDD speed 3.2 GHz…but when number of user increaess it becomes very slow specially when transaction is recording for stock related documents like purchase receipt, delivery note and transfer…its amost taking to 50-55 seconds for recording one purchase receipt if number of users is almost 5 and above.also for information we are using V8 of erpnext.thanks

Negative stock is a bad idea. From every perspective.

Planning: You can’t use MRP

Controls: You have no absolute data to figure out where you are leaking quantities of items

System: There is an awful lot of overhead.

@noetico: Is there anyway you can work with your client to turn off negative stock? All they need to do is one Sunday (or weekly off day), do a physical stock verification. After that, for that outlet, you need to pass all incoming and outgoing entries promptly. Negative stock by itself may not be the only reason why you have these performance issues, but there are good reasons to move away from negative stock.

Do you use offline POS mode because you have an internet connection that’s unreliable? Or does (apologies if this is a stupid question) ERPNext not give us an option about this.

Can we simulate a configuration where you turn off negative stock and don’t use the offline mode and see if that has a significant effect on the performance?

Thanks

Jay

Sure. Can use SQL to extract/move data to new DB if required. Was just a bit concerned that schemes would have changed since V6. I guess try the ERPNext update process but lots of changes.

Negative is indeed bad, but like I earlier said in the other post, most stores can’t do without it due to staff shortage and availability of highly efficient people. I’m doing an sqldump now and I’ll offer this data so people can use any spare time to load it on v9 as I try as well.

Great you should join us Sir. I can see you have also take erpnext to a high level of usage and hase same issues on v8. Your server is even better but yours appears worse! our PRs, STEs and POs take say 15 to 20 seconds if same day and longer than 2 minutes if up to 5 or 6 days and often even fails at that.

one suggestion for you. Move to ssd, the drive speed also helps a lot, I think we are better even with your faster system because we are using an ssd HD

I have the sqldump file, its 1.2GB, I think that’s large for a database right? May I ask for private emails of anyone who wants to test this on their system so I don’t share private business data on the forum (if it’s allowed). thanks.

@noetico
Have you followed this?
https://mariadb.com/kb/en/library/slow-query-log-overview/

Note that the defaults are not sufficient so reduce long_query_time to something like 2 secs and activate log_queries_not_using_indexes. Let’s start from there as I’m not excited at the prospect of downloading 1.2Gb

ok good people, I have started the upgrade, I Will post my progress, thanks.

1 Like
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/log/mysql/slow_query.log
log_queries_not_using_indexes

this is what I have, correct?

Updating v6 to v9 currently, started with nodes upgrade the psutil, then based on previous experience I went straight to bench update --reset and the progress is the best I have seen, no errors yet. Keeping my fingers crossed.

frappe

log_queries_not_using_indexes = 1 right?

wow… missed that, didn’t have the =1. adding now. thanks.

hit an error now on update, what do I do?

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“ia32”})
npm ERR! Linux 3.13.0-68-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! file /home/frappe/.npm/graceful-fs/4.1.11/package/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/frappe/.npm/graceful-fs/4.1.11/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR! /home/frappe/frappe-bench/npm-debug.log
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 75, in _update
update_npm_packages(bench_path=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install
frappe@erpnext:~/frappe-bench$

Do I need to update ubuntu?