Comments (9)
(back from parental leave)
Seems like your system is paging like hell. How much mem does your system have? Is there some limitation of the process RSS size in place?
I can write some specialized parser for the file list that further reduces the amount of needed memory, but the current code doesn't need that much mem already. So I wonder why it's so slow for you.
(Btw mremap doesn't really copy memory, it just changes the mapping for the pages)
from libsolv.
There is dynamic memory management on that virtual machine, but there is always few hundreds megs free. No additional limitations.
[user@testvm ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1212
max locked memory (kbytes, -l) 131072
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1212
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Also when I assign that machine 2GB statically (from which 1.5GB is free), the problem is still there. I don't think it's about amount of memory (100MB isn't that much), but about the way it is assigned (a lot of small mremaps).
from libsolv.
Maybe mremaps are slower under virtualization. In case of marmarek, he probably uses Xen PV.
from libsolv.
Hmm, I don't see how virtualization can slow down mremap, but I don't habe much experience with Xen.
Does the dnf process have a big enough RSS size? I.e. can you please run dnf makecache and monitor the RSS size with a tool like 'top'?
from libsolv.
If you want to try less mremap calls, please change the EXTDATA_BLOCK define in repodata.c from 1023 to 65535.
from libsolv.
RSS starts from ~100M (after downloading repo md), then increases slowly to about 250M.
I'll try that modification.
from libsolv.
With that modification, it's much better - about 1 minute "sys" time (down from over 10min).
Maybe it is possible to start with some approximation of required memory and allocate that? If not, is it an option to make EXTDATA_BLOCK default to 64k?
Fragment of strace:
21:38:14.192737 mremap(0x7f5f0e903000, 111546368, 111611904, MREMAP_MAYMOVE) = 0x7f5f062fe000 <0.031068>
21:38:14.224068 mremap(0x7f5f062fe000, 111611904, 111677440, MREMAP_MAYMOVE) = 0x7f5f0e8e3000 <0.024803>
21:38:14.249684 mremap(0x7f5f0e8e3000, 111677440, 111742976, MREMAP_MAYMOVE) = 0x7f5f062de000 <0.025371>
21:38:14.275512 mremap(0x7f5f062de000, 111742976, 111808512, MREMAP_MAYMOVE) = 0x7f5f0e8c3000 <0.035265>
21:38:14.311151 mremap(0x7f5f0e8c3000, 111808512, 111874048, MREMAP_MAYMOVE) = 0x7f5f062be000 <0.038956>
21:38:14.350499 mremap(0x7f5f062be000, 111874048, 111939584, MREMAP_MAYMOVE) = 0x7f5f0e8a3000 <0.026496>
from libsolv.
Ok, try commit a8220fe. It reduces the mremap calls from 96163 to 675 when converting Fedora22's Everything repo (I guess that's the repo you're talking about). It doesn't do much difference on my system, though...
Please change the EXTDATA_BLOCK value back to the original value, the new commit works in a different way.
I get the following stats for reading primary/filelist and then writing the filelist as solv file:
10.168u 0.272s 0:10.45 99.8% 0+0k 0+63304io 0pf+0w
10 seconds seems ok to me, 1 minute would IMHO be too slow.
from libsolv.
Thanks! This makes the whole dnf check-update
needing only 4s of sys time.
from libsolv.
Related Issues (20)
- What is the logic in the rule sorting? HOT 2
- Obsoletes is not honored while solving HOT 4
- Using old version to satisfy dependency HOT 3
- Unable to find size of unsigned char string returned by solvable_lookup_bin_checksum HOT 2
- solvable_lookup_bin_checksum() returning only sha256 HOT 1
- Using `focusbest` with `ignorerecommended` installs recommend anyway HOT 1
- Setting a limit on concurrently installed installonly packages HOT 3
- What about release of 0.7.25 HOT 3
- segfault from libsolv during dependency checking for reposync from source with large metadata file. HOT 6
- RFE: is it possible to start making github releases?🤔 HOT 5
- solv.so Ruby binding should depend on libruby HOT 1
- Prefer latest versions of newly pulled in dependencies over smaller transaction
- Non consistent behavior of installonly packages HOT 2
- dumpsolv -j hangs when executed in container with allocated tty HOT 1
- Extend unneeded packages by weak dependencies HOT 4
- lua bindings? HOT 6
- testsolv json output
- libzypp and code using it can't be built with a C++20 compiler HOT 1
- testsolv -W hangs for some packages HOT 2
- Add support for parsing `repodata.json` file with `repodata_version` 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsolv.