Process uses 1GB of memory
One of the notes in the readme says it has a small memory footprint, but it appears to be using 1GB of ram?
3702 root 1220m S ftpserver -conf /mnt/SDCARD/.userdata/tg5040/FTP Server/ftpserver.json
The config is the following:
{
"version": 1,
"accesses": [
{
"user": "minui",
"pass": "minui",
"fs": "os",
"params": {
"basePath": ""
}
}
],
"listen_address": "0.0.0.0:21",
"logging": {
"file_accesses": true,
"ftp_exchanges": true
},
"passive_transfer_port_range": {
"start": 2122,
"end": 2130
}
}
I'm running the arm64 version on the Trimui Brick handheld device. Any ideas as to what might be causing the large ram usage?
@josegonzalez
Hi, I'm not a maintainer of this project, but I recently ran into a similar issue in a different context and got an explanation that made sense to me. I thought it might be helpful to share here in case it’s relevant to your situation too.
I'm also using a Linux system with an arm64 CPU. When I ran ftpserver and checked the process using ps -u -p
This seems to suggest the high VSZ isn’t specific to ftpserver, but more likely related to how Go allocates virtual memory. From what I’ve learned, it’s not something to worry about. The Go team explains this behavior here:
https://go.dev/doc/faq#Why_does_my_Go_process_use_so_much_virtual_memory
So even though it looks like ftpserver is using over 1GB of memory, the actual memory usage is likely much lower. You might want to look at the RSS value instead—although even that isn’t a perfect measure, it can give you a rough idea.
Hope this helps!
Yes definitely not related to ftpserver. On Mac Os you can even read 392GB of virtual memory size.