Skip to content

Parse Server performance loss #7036

Closed
Closed
@uzaysan

Description

@uzaysan

New Issue Checklist

Issue Description

When I do performance test with parse server, performance decreases. And When I say decreases, I don't mean it decrease a little then stop. I mean It always decrease and doesn't stop decreasing. But This only happens when we use parse query in cloud code and query (in cloud code) returns parse object(s). But queries that doesn't return parse object(count query) or queries that should return array of parse objects but returns empty array(for example collection is empty), performance doesn't decrease. They are fine. Problem only happens when query return parse object. You can see more information on forum thread that I have created

Steps to reproduce

Create a cloud code and put a simple query in it(query must return parse object(s)). Then do countinues benchmark test against this cloud code.
I used wrk library to do benchmark tests. This is the code I used when I do benchmarking:
wrk -t1 -c400 -d30s -H "Content-Type: application/json" -H "X-Parse-Application-Id: YOUR_APP_ID" -s post.lua http://parse_server_ip:1337/parse/functions/codeWithQuery

Here is an example cloud code:

Parse.Cloud.define("codeWithQuery", async (request) => {
  const Follow = Parse.Object.extend("Follow");
  //Follow class has 35 objects. So this query returns 35 parse objects.
  const getFollow = new Parse.Query(Follow);
  return await getFollow.find({useMasterKey:true});
});

Actual Outcome

Requests per second decreases. You can see my benchmark history on this message.
And You can see information on that thread.

Expected Outcome

Performance shouldn't decrease. Even if it does, It should be stable after some time.

Environment

Server

  • Parse Server version: 4.3.0
  • Operating system: Ubuntu 18.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Remote host

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.4.1
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Remote

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Cloud Code
  • SDK version: Cloud Code

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions