hobuinc / greyhound

Greyhound is a point cloud streaming server. It should be considered deprecated for now. Use Entwine and Entwine Point Tile directly if you just want to serve point cloud web services.
https://greyhound.io
Apache License 2.0
131 stars 51 forks source link

Ram never released with docker #61

Closed matzora closed 6 years ago

matzora commented 6 years ago

Hi @connormanning

I have a problem using greyhound docker.

Tested with version : -latest -1.1.1 -1.1 -1.0

I'm running the container using this :

docker run -it -p 8080:8080 -v /home/me/greyhound.conf:$HOME/greyhound.conf -v /home/me/entwine:/entwine connormanning/greyhound:1.1.1 -c $HOME/greyhound.conf.

My configuration file is : { "cacheSize": "8 GB", "paths": ["/entwine"], "resourceTimeoutMinutes": 30, "http": { "port": 8080, "headers": { "Cache-Control": "public, max-age=300", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET,PUT,POST,DELETE" } } }

When i ask for data from my browser ram never be released.

At fresh start :

$ free -m total used free shared buff/cache available Mem: 16091 193 9515 112 6382 15540 Swap: 510 164 346

$ docker stats

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 41fbdc424b94 gifted_goldberg 0.00% 8.234MiB / 15.71GiB 0.05% 618B / 0B 0B / 0B

After i just move in 3D view in potree and i have this :

$ free -m total used free shared buff/cache available Mem: 16091 1500 8199 112 6390 14232 Swap: 510 163 347

$ docker stats

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 41fbdc424b94 gifted_goldberg 0.00% 1.284GiB / 15.71GiB 8.17% 1.87MB / 63.4MB 7.39MB / 0B 9

When i continue to moved in potree the ram just increase.

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 41fbdc424b94 gifted_goldberg 9.18% 4.042GiB / 15.71GiB 25.72% 4.91MB / 165MB 89.7MB / 0B 9

I have tried to change cacheSize to 512 MB. it doesn't change anything.

Have you got a solution to this ?

Thanks in advance.

EDIT

Here my docker info command.

Containers: 1 Running: 1 Paused: 0 Stopped: 0 Images: 2 Server Version: 17.12.0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 89623f28b87a6004d4b785663257362d1658a729 runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 4.9.78-xxxx-std-ipv6-64 Operating System: Ubuntu 16.04.3 LTS OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 15.71GiB Name: ns343385 ID: FPV3:HL67:AJDI:LMKZ:DIJK:7XZU:K257:OBXB:3DKR:RYRO:E6IM:UPLX Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

matzora commented 6 years ago

Up

connormanning commented 6 years ago

Your cacheSize is quite large - this value doesn't represent the memory Greyhound is allowed to use, it just controls one specific cache for back-end data. This should be correlated to, but not equal to, the allowable memory that Greyhound can use. Yes, this is nonintuitive, but maybe try cacheSize: "1 GB" for slightly better usage.

That said, I do think that there's potentially an issue with memory usage growing over time and I'm looking into it but there's no fix yet.

matzora commented 6 years ago

Thanks for your answer. I will try with 1GB cacheSize.

connormanning commented 6 years ago

This should be better with the latest docker container.