[ 
https://issues.apache.org/jira/browse/NUTCH-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136268#comment-18136268
 ] 

ASF GitHub Bot commented on NUTCH-2455:
---------------------------------------

lewismc commented on PR #888:
URL: https://github.com/apache/nutch/pull/888#issuecomment-6568116492

   Hi @sebastian-nagel, I measured the follow-up that hashes the extracted host 
directly and drops the HostDb partition cache.
   
   ## What changed
   
   `SelectorWithHostDb` now sends both the HostDb hostname and the host parsed 
from each CrawlDb URL through `URLPartitioner.getPartitionForRoot`. Those 
CrawlDb rows no longer run `URLNormalizers.SCOPE_PARTITION`. If 
`generate.hostdb` is set and `partition.url.mode` is not `byHost`, the selector 
logs an error and still partitions by host. The job configuration is left 
unchanged. The no-HostDb job is still the `FloatWritable` selector.
   
   ## Same 4 GB setup
   
   Same 50M CrawlDb and 1M-host HostDb, local mode, Java 17, the default 4 GB 
heap, and eight reducers. Three runs of each, median of `Generator: finished`. 
Every run exited 0. The cache build and the new build were measured in the same 
session. Profiles went to the same `nutch.generator` service on the 
`profiles-prod-008` data source of my Grafana Cloud stack. Note: apologies, I 
actually cannot add you there after all as it is a staff account. Sorry!
   
   The cache rows are `variant=nutch-2455-hostcache`, 
`git_sha=d4cb33ba8-hostcache`. The new rows are `variant=nutch-2455-hostroot`, 
`git_sha=d4cb33ba8-hostroot`. The window is 2026-11-02T01:35:00Z through 
2026-11-02T02:45:00Z.
   
   **50,000,000 URLs, 1,000,000 hosts**
   
   | Path | Partition cache | Extracted-host hash | Peak RSS |
   | -

> Use secondary sorting for memory-efficient HostDb integration in Generator
> --------------------------------------------------------------------------
>
>                 Key: NUTCH-2455
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2455
>             Project: Nutch
>          Issue Type: Improvement
>          Components: generator
>    Affects Versions: 1.13
>            Reporter: Markus Jelsma
>            Assignee: Lewis John McGibbney
>            Priority: Major
>             Fix For: 1.24
>
>         Attachments: NUTCH-2455.patch
>
>
> Citing Sebastian at NUTCH-2420:
> ??The correct solution would be to use <host,score> pairs as keys in the 
> Selector job, with a partitioner and secondary sorting so that all keys with 
> same host end up in the same call of the reducer. If values can also hold a 
> HostDb entry and the sort comparator guarantees that the HostDb entry 
> (entries if partitioned by domain or IP) comes in front of all CrawlDb 
> entries. But that would be a substantial improvement...??



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to