i2pd icon indicating copy to clipboard operation
i2pd copied to clipboard

peerProfiles too large

Open khumarahn opened this issue 1 year ago β€’ 33 comments

Hi. I ran out space today: the peerProfiles folder grew over 2.5GB. This isn't that much, but I run i2pd on a cheap vps with very limited storage. I wonder if this is normal, and if there's a way to optimize storage.

khumarahn avatar May 04 '23 16:05 khumarahn

I suggest you to shut down node, delete peerProfiles folder and start node again.

I wonder if this is normal

This is side effect of ongoing attack.

Vort avatar May 04 '23 16:05 Vort

Oh, an attack?

khumarahn avatar May 04 '23 16:05 khumarahn

Yes, network is under attack. There were several waves of spreading fake floodfills routerinfos. That what lots of peerprofiles means. They describe fake nodes.

Vort avatar May 04 '23 16:05 Vort

Is there an automatic way to remove peer profiles, or it is only manual?

khumarahn avatar May 04 '23 16:05 khumarahn

They are cleared automatically. But in case of attack there are just too many of them.

Vort avatar May 04 '23 16:05 Vort

I have noticed several attacks on ~ past week, in addition to huge number of peer profile files, I almost got exhausted from memory. Most of relays would probably have already fallen xD I2Pd_DoS_02_Res I2Pd_DoS_02

After I had to move the I2Pd working directory from the RAM disk to the HDD, I have the following picture:

I2Pd_DoS_03 And relative "small" memory usage: about 500 MiB.

@Vort as you can see, now I have ~40k peers, ~30k floodfills and in total about of 1 million files in the I2Pd profile directory. Should I stop service and clean up NetDB and/or peerProfiles, or wait until I2Pd cleans up data itself due to its irrelevance?

SilmorSenedlen avatar May 05 '23 23:05 SilmorSenedlen

@SilmorSenedlen that RAM consumption is a big problem. But I don't know how to track down why it happens. From my experience, it can happen because of lags. Something somewhere make system overload and i2pd start glitching because of it.

First of all, you need to update your node. I personally tested 2.47.0-67-gc1168c2a and it works relatively good. But there are more commits made after it, will test them too soon. If you will update node, then in the process it is better to clean peerProfiles. As for netDb, I think it will clean itself during few hours after update.

upd. It looks like 2.47.0-71-ge068a3cf works good too.

Vort avatar May 06 '23 05:05 Vort

i2pd version 2.47.0-68-g2f74e670 (0.9.58) floodfill = true uptime 1 d 4 h /var/lib/i2pd/peerProfiles/ folder grew from 0 to 2 GB, 507000 files 14000-14500 transit tunnels i2pd process memory usage: about 380 MB

LLE8 avatar May 06 '23 10:05 LLE8

Where can download this new nodes?

snaike00 avatar May 08 '23 13:05 snaike00

For Windows, here: https://github.com/PurpleI2P/i2pd/actions/workflows/build-windows.yml https://github.com/PurpleI2P/i2pd/actions/runs/4903844731 https://github.com/PurpleI2P/i2pd/suites/12722999303/artifacts/683318292

Vort avatar May 08 '23 13:05 Vort

For Windows, here: https://github.com/PurpleI2P/i2pd/actions/workflows/build-windows.yml https://github.com/PurpleI2P/i2pd/actions/runs/4903844731 https://github.com/PurpleI2P/i2pd/suites/12722999303/artifacts/683318292

Thank you, but i need for linux (arm), some like this: i2pd_*bionic1_armhf.deb (maybe already have package?)

snaike00 avatar May 08 '23 14:05 snaike00

that RAM consumption is a big problem. But I don't know how to track down why it happens. From my experience, it can happen because of lags. Something somewhere make system overload and i2pd start glitching because of it.

Is it way to implement hard memory limit for i2pd, to save system and other apps from OOM(out of memory)? As last resort, of course.

SilmorSenedlen avatar May 08 '23 14:05 SilmorSenedlen

I think may be helpful ~prlimit --as~ ~prlimit --rss~

http://jlebar.com/2011/6/15/Limiting_the_amount_of_RAM_a_program_can_use.html

LLE8 avatar May 08 '23 14:05 LLE8

I think may be helpful

Sorry that I didn't indicate it right away, but I meant Windows version* Of course, that can be "resolved" by running I2Pd in container or VM, but it would be a huge overhead and cumbersome.

SilmorSenedlen avatar May 08 '23 15:05 SilmorSenedlen

Should be fixed after 1d8a91c commit. For now i2pd doesn't save peer profile if it values is near to default. Please test and close.

wekoq avatar May 08 '23 15:05 wekoq

For Windows, here: https://github.com/PurpleI2P/i2pd/actions/workflows/build-windows.yml https://github.com/PurpleI2P/i2pd/actions/runs/4903844731 https://github.com/PurpleI2P/i2pd/suites/12722999303/artifacts/683318292

Thank you, but i need for linux (arm), some like this: i2pd_*bionic1_armhf.deb (maybe already have package?)

Unfortunately there is still no armhf/arm64 packages built from trunk. If anybody have packaging skills and know how OBS works: I need help with creating automated builds. Here is working repository with release upload builds.

r4sas avatar May 08 '23 19:05 r4sas

r4sas, Π½Π΅ совсСм понял Π² Ρ‡Π΅ΠΌ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΠ° - Π² создании ΠΏΠ°ΠΊΠ΅Ρ‚Π° *.deb, ΠΈΠ»ΠΈ Π² ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠΈ Π±ΠΈΠ½Π°Ρ€Π½ΠΈΠΊΠ°?

snaike00 avatar May 10 '23 05:05 snaike00

r4sas, Π½Π΅ совсСм понял Π² Ρ‡Π΅ΠΌ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΠ° - Π² создании ΠΏΠ°ΠΊΠ΅Ρ‚Π° *.deb, ΠΈΠ»ΠΈ Π² ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠΈ Π±ΠΈΠ½Π°Ρ€Π½ΠΈΠΊΠ°?

Π’ написании скриптов для OBS, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π±Ρ‹ ΠΏΠΎΠ·Π²ΠΎΠ»ΠΈΠ»ΠΈ автоматичСски ΡΠΎΠ±ΠΈΡ€Π°Ρ‚ΡŒ ΠΏΠ°ΠΊΠ΅Ρ‚Ρ‹ для ΠΊΠΎΠ΄Π° ΠΈΠ· Ρ‚Ρ€Π°Π½ΠΊΠ°.

r4sas avatar May 10 '23 08:05 r4sas

r4sas, Π½Π΅ совсСм понял Π² Ρ‡Π΅ΠΌ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΠ° - Π² создании ΠΏΠ°ΠΊΠ΅Ρ‚Π° *.deb, ΠΈΠ»ΠΈ Π² ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠΈ Π±ΠΈΠ½Π°Ρ€Π½ΠΈΠΊΠ°?

Π’ написании скриптов для OBS, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π±Ρ‹ ΠΏΠΎΠ·Π²ΠΎΠ»ΠΈΠ»ΠΈ автоматичСски ΡΠΎΠ±ΠΈΡ€Π°Ρ‚ΡŒ ΠΏΠ°ΠΊΠ΅Ρ‚Ρ‹ для ΠΊΠΎΠ΄Π° ΠΈΠ· Ρ‚Ρ€Π°Π½ΠΊΠ°.

Π₯Π—. Π’ ΠΎΠ±Ρ‰Π΅ΠΌ ΠΏΠΎΠΊΠ° Π½Π΅ получится Π½ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½ΠΎ ΡŽΠ·Π°Ρ‚ΡŒ i2pd Π½Π° arm (

snaike00 avatar May 12 '23 16:05 snaike00

@snaike00 Raspberry Pi?

LLE8 avatar May 12 '23 19:05 LLE8

@snaike00 Raspberry Pi?

No, but armv7

snaike00 avatar May 12 '23 19:05 snaike00

Будя ΠΏΠΎ "some like this: i2pd_*bionic1_armhf.deb" Π½Π° этом устройствС Ubuntu 18.04?

LLE8 avatar May 15 '23 09:05 LLE8

Будя ΠΏΠΎ "some like this: i2pd_*bionic1_armhf.deb" Π½Π° этом устройствС Ubuntu 18.04?

Π”Π°. Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ Π΅ΡΡ‚ΡŒ скомпилированный Π±ΠΈΠ½Π°Ρ€Π½ΠΈΠΊ? Π­Ρ‚ΠΎΠ³ΠΎ Π±ΡƒΠ΄Π΅Ρ‚ Π²ΠΏΠΎΠ»Π½Π΅ достаточно :)

snaike00 avatar May 15 '23 09:05 snaike00

i2pd version 2.47.0-80-g623c3f46 Uptime 7 d 18 h Size of /var/lib/i2pd/peerProfiles/ folder is 196 MB, 31718 files i2pd process memory usage about 170 MB, 12000 transit tunnels

Π›ΠΈΠ±ΠΎ Π°Ρ‚Π°ΠΊΠ° ΠΏΡ€Π΅ΠΊΡ€Π°Ρ‚ΠΈΠ»Π°ΡΡŒ (Π²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ), Π»ΠΈΠ±ΠΎ Π±Π°Π³ испрапвлСн.

LLE8 avatar May 15 '23 09:05 LLE8

Π›ΠΈΠ±ΠΎ Π°Ρ‚Π°ΠΊΠ° ΠΏΡ€Π΅ΠΊΡ€Π°Ρ‚ΠΈΠ»Π°ΡΡŒ (Π²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ), Π»ΠΈΠ±ΠΎ Π±Π°Π³ испрапвлСн.

I don't noticed any new attacks from past week. And number of known Routers and Floodfills from my previous post decreased to the current amount by itself, within a few days. Version: 2.47.0

Uptime: 11 days, 10 hours, 25 minutes, 32 seconds
Network status: OK
Network status v6: OK
Tunnel creation success rate: 10%
Received: 2103.02 GiB (947.92 KiB/s)
Sent: 2207.30 GiB (997.02 KiB/s)
Transit: 1947.43 GiB (895.81 KiB/s)
Routers: 10870 Floodfills: 1333 LeaseSets: 214
Client Tunnels: 27 Transit Tunnels: 8777

Virt. mem: 545 MiB RAM: 400 MiB peerProfiles: ~34k files netDb: ~ 30k files

SilmorSenedlen avatar May 15 '23 09:05 SilmorSenedlen

Π—Π½Π°Ρ‡ΠΈΡ‚ Ρ‚Π°ΠΌ Π΅ΡΡ‚ΡŒ всС Π½ΡƒΠΆΠ½Ρ‹Π΅ срСдства Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ ΠΈ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ? ΠœΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ ΠΏΠΎΠΏΡ€ΠΎΠ±ΠΎΠ²Π°Ρ‚ΡŒ ΡΠΎΠ±Ρ€Π°Ρ‚ΡŒ нСпосрСдствСнно Π½Π° самом устройствС? 512 ΠœΠ‘ ΠžΠ—Π£ + 1Π“Π‘ свопа найдСтся? ΠžΡ‚ΡΡŽΠ΄Π° https://i2pd.readthedocs.io/en/latest/devs/building/unix/ ΠΌΠΎΠΆΠ½ΠΎ ΠΈΠ·Π²Π»Π΅Ρ‡ΡŒ ΠΏΡ€ΠΎΡΡ‚ΡƒΡŽ ΠΈ Ρ€Π°Π±ΠΎΡ‚ΠΎΡΠΏΠΎΡΠΎΠ±Π½ΡƒΡŽ (ΠΏΡ€ΠΎΠ²Π΅Ρ€Π΅Π½ΠΎ) ΠΈΠ½ΡΡ‚Ρ€ΡƒΠΊΡ†ΠΈΡŽ ΠΈΠ· дСсятка ΠΊΠΎΠΌΠ°Π½Π΄. Русский Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ https://i2pd.readthedocs.io/ru/latest/build_notes_unix.html каТСтся Π½Π΅ΠΌΠ½ΠΎΠ³ΠΎ Π½Π΅ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ‹ΠΉ, вСроятно устарСл.

LLE8 avatar May 15 '23 10:05 LLE8

К соТалСнию Ρ‚Π°ΠΌ ΠΎΡ‡Π΅Π½ΡŒ урСзанная ОБ, ΡΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ Π½Π° Π½Π΅ΠΉ получится.

snaike00 avatar May 15 '23 10:05 snaike00

БСйчас ΠΏΠΎΠΏΡ€ΠΎΠ±ΡƒΡŽ Π²ΠΊΠ»ΡŽΡ‡ΠΈΡ‚ΡŒ сборку armhf/arm64 Π² PPA Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ: https://launchpad.net/~purplei2p/+archive/ubuntu/i2pd-git/+packages

add: Π°Π½, Π½Π΅Ρ‚... Π½Π΅ получится. Π’Π°ΠΌ нСльзя Π²Ρ‹Π±ΠΈΡ€Π°Ρ‚ΡŒ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρƒ ΠΏΡ€ΠΈ сборкС ΠΏΠΎ "Ρ€Π΅Ρ†Π΅ΠΏΡ‚Π°ΠΌ". add2: Π΅ΡΡ‚ΡŒ ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»ΡŒ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€ Π² самом Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ, Π½ΠΎ Π½Π΅ знаю повлияСт Π»ΠΈ ΠΎΠ½. ΠŸΠΎΡΠΌΠΎΡ‚Ρ€ΠΈΠΌ...

r4sas avatar May 17 '23 14:05 r4sas

БСйчас ΠΏΠΎΠΏΡ€ΠΎΠ±ΡƒΡŽ Π²ΠΊΠ»ΡŽΡ‡ΠΈΡ‚ΡŒ сборку armhf/arm64 Π² PPA Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ: https://launchpad.net/~purplei2p/+archive/ubuntu/i2pd-git/+packages

add: Π°Π½, Π½Π΅Ρ‚... Π½Π΅ получится. Π’Π°ΠΌ нСльзя Π²Ρ‹Π±ΠΈΡ€Π°Ρ‚ΡŒ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρƒ ΠΏΡ€ΠΈ сборкС ΠΏΠΎ "Ρ€Π΅Ρ†Π΅ΠΏΡ‚Π°ΠΌ". add2: Π΅ΡΡ‚ΡŒ ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»ΡŒ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€ Π² самом Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΈ, Π½ΠΎ Π½Π΅ знаю повлияСт Π»ΠΈ ΠΎΠ½. ΠŸΠΎΡΠΌΠΎΡ‚Ρ€ΠΈΠΌ...

ΠŸΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»ΡŒ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€ судя ΠΏΠΎ всСму повлиял, Π½ΠΎ Π²ΠΈΠΆΡƒ ΠΏΠ°ΠΊΠ΅Ρ‚ armhf Ρ‚ΠΎΠ»ΡŒΠΊΠΎ для Ubuntu 23.10.1 ΠœΠΎΠΆΠ΅Ρ‚ Π²Ρ‹ΠΉΠ΄Π΅Ρ‚ ΡΠΎΠ±Ρ€Π°Ρ‚ΡŒ armhf ΠΏΠΎΠ΄ Ubuntu 18.04 (Bionic) ?

snaike00 avatar May 18 '23 14:05 snaike00

А ΠΌΠΎΠΆΠ΅Ρ‚ для этого устройства Π΅ΡΡ‚ΡŒ OpenWrt? Π’Ρ€Π°Π½ΠΊ собираСтся ΠΎΡ‚Π½ΠΎΡΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ просто
https://github.com/PurpleI2P/i2pd/issues/345 Ρ‚Π°ΠΌ Π΅ΡΡ‚ΡŒ ΡΠΎΠΎΡ‚Π²Π΅Ρ‚ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΠΉ Makefile

LLE8 avatar May 20 '23 09:05 LLE8