# Farming cluster plot time

**URL:** <https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080>\
**Category:** Support\
**Created:** [May 29, 2024, 3:59am UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080 "2024-05-29T03:59:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![keens312](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@keens312](https://forum.autonomys.xyz/u/keens312)\
**Post date:** [May 29, 2024, 3:59am UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/1 "2024-05-29T03:59:10Z")

</div>

## Issue Report

To plot a new farm, farming-cluster takes more time than regular farmer.

### Environment

- **Operating System:** Ubuntu 18.04
- **Pulsar/Advanced CLI/Docker:** CLI

### Problem

My server takes 7 minutes for each sector to plot with regular farmer.  
The same server takes 31 minutes with farming-cluster (The server runs controller, cache, plotter and farmer, without other node).

Why the cluster farmer performance is worse than regular farmer?

```auto
[Paste any errors or relevant logs here]

```

> 6014 and 6013 is the name of my x86\_64 Server with CPU 12 core 4.4GHz.  
> 6014 single node cluster 1GB plot: 31 mins  
> 2024-05-28T11:39:41.035386Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (0.00% complete) sector\_index=0  
> 2024-05-28T12:10:44.884067Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Initial plotting complete
> 
> 6014 single node cluster 2GB plot: 48 mins (+17)  
> 2024-05-28T13:11:56.462001Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (0.00% complete) sector\_index=0  
> 2024-05-28T13:11:56.464066Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (50.00% complete) sector\_index=1  
> 2024-05-28T13:59:53.956365Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Initial plotting complete
> 
> 6014 single node cluster 3GB plot: 57 mins (+9)  
> 2024-05-28T14:11:29.280458Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (0.00% complete) sector\_index=0  
> 2024-05-28T14:11:29.282809Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (33.33% complete) sector\_index=1  
> 2024-05-28T14:11:29.284934Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (66.67% complete) sector\_index=2  
> 2024-05-28T15:08:45.901572Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Initial plotting complete
> 
> 6014 single node cluster 4GB plot: 68 mins (+11)  
> 2024-05-28T22:57:49.265806Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (0.00% complete) sector\_index=0  
> 2024-05-28T22:57:49.267754Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (25.00% complete) sector\_index=1  
> 2024-05-28T22:57:49.269688Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (50.00% complete) sector\_index=2  
> 2024-05-28T22:57:49.271688Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plotting sector (75.00% complete) sector\_index=3  
> 2024-05-29T00:05:47.153511Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Initial plotting complete
> 
> 6014 6013 cluster 4GB plot: 101 mins  
> 2024-05-29T00:24:30.859609Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plottiing sector (0.00% complete) sector\_index=0  
> 2024-05-29T00:24:30.861712Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plottiing sector (25.00% complete) sector\_index=1  
> 2024-05-29T00:24:30.863937Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plottiing sector (50.00% complete) sector\_index=2  
> 2024-05-29T00:24:30.866185Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Plottiing sector (75.00% complete) sector\_index=3  
> 2024-05-29T02:05:13.996870Z INFO {farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Initial plotting complete

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [May 29, 2024, 7:48am UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/2 "2024-05-29T07:48:17Z")

</div>

Plotting in a cluster can be limited by the cache and networking. Specifically when plotter needs pieces it will request pieces from controller and controller will request them from cache. Make sure cache is fully synced first or else controller will have to reach out to DSN first. Also note that every message goes to and from NATS server in this architecture. So if NATS server is on a separate machine from controller and cache, it will be much slower even if everything seems to run on the same machine.

---

<div class="post-metadata">

**Author:** ![keens312](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@keens312](https://forum.autonomys.xyz/u/keens312)\
**Post date:** [May 29, 2024, 10:59am UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/3 "2024-05-29T10:59:27Z")

</div>

I set cache size to 8GiB. What are the rules to define the proper cache size?

./subspace-farmer cluster --nats-server nats://192.168.0.10:4222 cache path=/home/fact/subspace/cluster/cache,size=8GiB

---

<div class="post-metadata">

**Author:** ![PuNkYsHuNgRy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/punkyshungry/32/541_2.png) [@PuNkYsHuNgRy](https://forum.autonomys.xyz/u/PuNkYsHuNgRy)\
**Post date:** [May 29, 2024, 6:35pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/4 "2024-05-29T18:35:33Z")

</div>

Cache size must be at least 200GB at the moment.

---

<div class="post-metadata">

**Author:** ![keens312](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@keens312](https://forum.autonomys.xyz/u/keens312)\
**Post date:** [May 30, 2024, 1:32am UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/5 "2024-05-30T01:32:19Z")

</div>

What’s the function of the cache during farming/plotting?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [May 31, 2024, 4:17pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/6 "2024-05-31T16:17:50Z")

</div>

Cache allows your plotter to retrieve pieces from local storage rather than downloading from the Internet. If you store the whole history locally in cache it allows plotter to avoid reaching out to Internet completely.

---

<div class="post-metadata">

**Author:** ![keens312](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@keens312](https://forum.autonomys.xyz/u/keens312)\
**Post date:** [June 2, 2024, 2:11pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/7 "2024-06-02T14:11:02Z")

</div>

The subspace-node will download the whole history (About 60GB so far) from internet for the first time.  
Can plotter retrieve pieces from node (LAN speed should be much quick than internet) instead of cache?  
Please correct me if my understanding is wrong.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [June 2, 2024, 2:23pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/8 "2024-06-02T14:23:17Z")

</div>

No, node doesn’t store those pieces. It retrieves them, decodes blocks and throws pieces away afterwards. It will also prune older blocks as is sycns further.

---

<div class="post-metadata">

**Author:** ![keens312](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@keens312](https://forum.autonomys.xyz/u/keens312)\
**Post date:** [June 3, 2024, 2:47pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/10 "2024-06-03T14:47:12Z")

</div>

Hi Nazar, could you please have a look at 2 questions about cache.

1. In farming-cluster, is controller doing the piece sync, right? because its log shows “2024-06-03T02:22:55.661963Z INFO subspace\_farmer::farmer\_cache: Piece cache sync 99.34% complete”

2. After piece cache sync completed, where is the local file position?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [June 3, 2024, 3:04pm UTC](https://forum.autonomys.xyz/t/farming-cluster-plot-time/4080/11 "2024-06-03T15:04:28Z")

</div>

Controller is orchestrating piece cache sync and other operations. Piece cache is stored at path you specified during starting of the cache component.
