4

I have created Neo4j virtual machine in windows azure.How to increase the performance of it?Now it takes time in 30-50 seconds range for simple query also.How to improve this?Any one can please help?

My sample data model is given below

public class Users
{
    public string email
    {
        get;
        set;
    }
    public string password
    {
        get;
        set;

    }
    public string firstname
    {
        get;
        set;
    }
    public string lastname
    {
        get;
        set;
    }
    public string dob
    {
        get;
        set;
    }
    public string gender
    {
        get;
        set;
    }

    public string id
    {
        get;
        set;
    }
    public string facebookId
    {
        get;
        set;
    }
    public string googleId
    {
        get;
        set;
    }
    public string profile_pic
    {
        get;
        set;
    }
    public Guid Recoverid
    {
        get;
        set;
    }
    public Guid Emailverification
    {
        get;
        set;
    }
    public string HighSchool
    {
        get;
        set;
    }
    public string College
    {
        get;
        set;
    }
    public string Employer
    {
        get;
        set;
    }
    public string Currentcity
    {

        get;
        set;
    }
    public string HomeTown
    {
        get;
        set;
    }
    public bool registerationstatus
    {
        get;
        set;
    }
    public string Language
    {
        get;
        set;

    }
    public string Username
    {
        get;
        set;
    }
    public string FullName
    {
        get;
        set;
    }
    public string joinDate
    {
        get;
        set;
    }
    public string primeryrecoverymail
    {
        get;
        set;
    }
    public string secondaryrecoverymail
    {
        get;
        set;
    }
    public string loginnotification
    {
        get;
        set;
    }
    public string Mobileno1
    {
        get;
        set;
    }
    public string Mobileno2
    {
        get;
        set;
    }
    public string FuturePostSettings
    {
        get;
        set;
    }
    public string FriendrequestSettings
    {
        get;
        set;
    }
    public string Contactmesettings
    {
        get;
        set;
    }
    public string Lookmebymail
    {
        get;
        set;
    }
    public string LookmebyPhone
    {
        get;
        set;
    }
    public string isvisible
    {

        get;
        set;
    }
    public string userstatus
    {
        get;
        set;
    }



    #endregion

}

and query is var datas = client.Cypher.Match("(user:User)").Where((Users user) => user.email == email && user.password == password).Return(user => user.As<Users>()).Results;

bmscomp
  • 777
  • 1
  • 11
  • 21
Midhuna
  • 4,523
  • 4
  • 21
  • 22
  • Can you please provide more information on your setup? Did you use the Windows Azure VM Depot? What version of Neo4j? What were your VM configurations? What kind of queries were you running? – Kenny Bastani Jul 09 '14 at 07:39
  • Yes I have used images available in the VM Depot.Version of Neo4j is Neo4j-Community-2-0-1-on-Ubuntu-12-04-LTS.Simple login queries are also take up to 50 seconds.Just return a user node with given username and password. – Midhuna Jul 09 '14 at 08:17
  • I second Kenny, please provide more information: What does your data model look like? How much data do you have? What does your config look like? Did you create an index for the :Person(login) ? to do `MATCH (p:Person) WHERE p.login = {login} AND p.password = {password}` – Michael Hunger Jul 09 '14 at 10:23
  • I always get an error 'Disconnected from Neo4j. Please check if the cord is unplugged.'while accessing the neo4j browser – Midhuna Jul 09 '14 at 10:25
  • 1
    What is the size of your VM? How much memory have you allocated? I think the problem is tweaking the memory mapped configurations located in the conf directory of the Neo4j installation directory. – Kenny Bastani Jul 09 '14 at 17:14

1 Answers1

1

I recently had the same type of problem. Everything was working well on my local machine but when I tried with Azure it ran like a three legged dog. The fact that you are getting time-outs indicates that you are exploding the JVM. In the end I changed two things

  • Don't use the Azure VM Depot for the Neo4j for Windows. The version is very much out of date. It's version 1.8 if I can remember correctly. Instead, I followed the installation in this link. It was very helpful. I used a A3 VM (4 cores, 7G RAM) which seems appropriate for the 1M nodes in my base.

  • I had a lot of problems with the JVM settings. This was my real problem, and I suspect that it's yours. Refer to the Neo4j documentation for your situation. You will need to update the neo4j-community.vmoptions file which you will locate in the Neo4j options under Java VM Tuning. I'm not a Java person, but the entries that I added were -Xmx -Xms -Xss -XX:+UseConcMarkSweepGC Obviously you will need to put in your values against these seetings. For my VM I used 4G for the -Xmx (i.e. -Xmx4G). Note that a lot of people in other forum threads recommend updating the conf/neo4j-wrapper.conf file to update your JVM settings. This was misleading as it was the neo4j-community.vmoptions file that need to be changed.