Clean shutdown Ie "quit" or ctrl-d
Von meinem iPhone gesendet > Am 06.03.2016 um 00:47 schrieb Jesse Hemingway <jirop...@gmail.com>: > > Ok, that certainly works. That's a bit boggling -- I have quite a few indexes > and constraints, if that could have any effect. I also use the TimeTree > module by GraphAware (several at once). I'll play around with a few > combinations when I have time to focus on that oddity and hopefully report > back with more useful information. Also, when do the disused records get > recovered – on shutdown? I'm just running with `neo4j console`, killing it > with Ctrl+C each time. > >> On Sat, Mar 5, 2016 at 3:10 PM, Michael Hunger >> <michael.hun...@neotechnology.com> wrote: >> Interesting, it works for me: >> >> on empty db, create 100k nodes 100k rels delete everything, check sizes >> restart create 100k nodes 100k rels delete everything, check sizes >> same size on disk >> wuqour:neo4j-enterprise-2.3.2 mh$ rm -rf test*.db >> >> wuqour:neo4j-enterprise-2.3.2 mh$ bin/neo4j-shell -path test.db >> >> NOTE: Local Neo4j graph database service at 'test.db' >> >> Welcome to the Neo4j Shell! Enter 'help' for a list of commands >> >> >> >> >> >> neo4j-sh (?)$ foreach(x in range(1,100000) | create (:Person {name:"person >> "+x, age : x % 100})); >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Nodes created: 100000 >> >> Properties set: 200000 >> >> Labels added: 100000 >> >> 5996 ms >> >> neo4j-sh (?)$ unwind range(1,100000) as x match (p) where id(p) = x match >> (p2) where id(p2) = toInt(rand()*100000) create (p)-[:KNOWS]->(p2); >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Relationships created: 99999 >> >> 3185 ms >> >> neo4j-sh (?)$ match (n) detach delete n; >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Nodes deleted: 100000 >> >> Relationships deleted: 99999 >> >> 1654 ms >> >> neo4j-sh (?)$ quit >> >> wuqour:neo4j-enterprise-2.3.2 mh$ du -sh test.db/neostore*.db >> >> 8,0K test.db/neostore.labeltokenstore.db >> >> 1,4M test.db/neostore.nodestore.db >> >> 3,9M test.db/neostore.propertystore.db >> >> 8,0K test.db/neostore.relationshipgroupstore.db >> >> 3,2M test.db/neostore.relationshipstore.db >> >> 8,0K test.db/neostore.relationshiptypestore.db >> >> 8,0K test.db/neostore.schemastore.db >> >> wuqour:neo4j-enterprise-2.3.2 mh$ bin/neo4j-shell -path test.db >> >> NOTE: Local Neo4j graph database service at 'test.db' >> >> Welcome to the Neo4j Shell! Enter 'help' for a list of commands >> >> >> >> >> >> neo4j-sh (?)$ foreach(x in range(1,100000) | create (:Person {name:"person >> "+x, age : x % 100})); >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Nodes created: 100000 >> >> Properties set: 200000 >> >> Labels added: 100000 >> >> 5911 ms >> >> neo4j-sh (?)$ unwind range(1,100000) as x match (p) where id(p) = x match >> (p2) where id(p2) = toInt(rand()*100000) create (p)-[:KNOWS]->(p2); >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Relationships created: 99999 >> >> 1897 ms >> >> neo4j-sh (?)$ match (n) detach delete n; >> >> +-------------------+ >> >> | No data returned. | >> >> +-------------------+ >> >> Nodes deleted: 100000 >> >> Relationships deleted: 99999 >> >> 1415 ms >> >> neo4j-sh (?)$ wuqour:neo4j-enterprise-2.3.2 mh$ du -sh test.db/neostore*.db >> >> 8,0K test.db/neostore.labeltokenstore.db >> >> 1,4M test.db/neostore.nodestore.db >> >> 3,9M test.db/neostore.propertystore.db >> >> 8,0K test.db/neostore.relationshipgroupstore.db >> >> 3,2M test.db/neostore.relationshipstore.db >> >> 8,0K test.db/neostore.relationshiptypestore.db >> >> 8,0K test.db/neostore.schemastore.db >> >> >>> On Sat, Mar 5, 2016 at 6:43 PM, Jesse Hemingway <jirop...@gmail.com> wrote: >>> This is not holding true for my setup, as I've seen my modest 10MB database >>> grow to 250MB over the course of repeatedly testing my seeding logic, and >>> shutting down the server many times as I made configuration changes for new >>> modules, etc. Also, this SO article (outdated? but seems to hold true) >>> indicates that space is not reclaimed. I've come across a tool in the >>> public domain to accomplish neo4j compaction, implying it isn't (or wasn't) >>> automatically supported. >>> >>> I repeated the restart-server test just now, and it does not alter the size >>> on disk -- the store is 18.2MB (19.4 on disk), twice my 'fresh' data size, >>> and I have reset/reseeded once. Next, I deleted the db, and after >>> reseeding, the size is back down to 9.14, with all the same data as before. >>> My log files were a drop in the bucket either way. >>> >>> Either way, I'm not going to quibble that if it's more efficient to re-use >>> old records than create new ones, it doesn't make sense to aggressively >>> compact the database. It would just be nice as an option, e.g. to assist in >>> file transfer when moving a database around, etc. >>> >>> >>>> On Saturday, March 5, 2016 at 7:18:56 AM UTC-6, Michael Hunger wrote: >>>> Unused recoreds are reclaimed after restart, so if you restart after >>>> cleaning out then it will. >>>> But you can also just delete the db-directory. >>>> >>>>> On Fri, Mar 4, 2016 at 10:52 PM, Jesse Hemingway <jiro...@gmail.com> >>>>> wrote: >>>>> I actually just delete my database if I want to reset everything to a >>>>> clean slate (shutting down server first). We have an auto-seeding >>>>> solution that reconstitutes our base data, so that may not be an option >>>>> for you. Otherwise, MATCH <stuff> DETACH DELETE <stuff> does the job. >>>>> >>>>> But on a related note, I notice that e.g. repeated use of MATCH (n) >>>>> DETACH DELETE n (with reseeding in between) does not seem to reclaim data >>>>> storage, and the overall database size keeps growing. Is this expected >>>>> behavior, or is there some garbage-collection process I need to trigger? >>>>> >>>>> >>>>>> On Saturday, February 27, 2016 at 6:43:52 PM UTC-6, Ara wrote: >>>>>> Hi , >>>>>> Recently installed Neo4j community version, I'am not able to clear >>>>>> the node labels, relationship type from database information. Kindly >>>>>> guide me on this issue.Thank you >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Neo4j" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to neo4j+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Neo4j" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to neo4j+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Neo4j" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/neo4j/nHcFTIRVOI8/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> neo4j+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.