Announcement

Collapse
No announcement yet.

Can I remove/disable apt-xapian-index?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I remove/disable apt-xapian-index?

    Another new guy, needing help, guys!

    Hi everyone,
    First time poster here. I didn't see any "Introduce Yourself" section. If there is one, please point it out to me for a proper presentation.
    Alright, here is the issue, I need some help with:

    I have noticed that every time I try to update my system or install something using Muon, the apt-xapian-index will run for several minutes taking up to 100% of the CPU capacity bringing the system to a halt. I thought of removing it but I realized that some other packages will be removed with it:

    Code:
    sudo apt purge apt-xapian-index --simulate  
    Reading package lists... Done
    Building dependency tree        
    Reading state information... Done
    The following packages will be REMOVED:
    apt-xapian-index* kubuntu-driver-manager* kubuntu-notification-helper* muon*
    So I decided not to. Then I thought, in order to prevent it from running, to rename the /usr/share/apt-xapian-index to something else.
    I appreciate if you could tell me if there is a way of removing it without removing the other packages or if renaming it will actually stop it from running.
    In either case, will that affect the ability of the system to update or install new software in a negative way?

    Thanks in advance!

    philotux

    #2
    Welcome. First, no, you don't want to remove that package; it's needed by apt. Second, what version of Kubuntu are you running?
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Originally posted by Snowhog View Post
      Welcome. First, no, you don't want to remove that package; it's needed by apt. Second, what version of Kubuntu are you running?
      Actually, apt itself does not require apt-xapian-index, but Muon Package Manager and the Driver Manager in System Settings do.

      If you don't use either of those (and you probably do ) it is ok to remove.

      I find that the indexing does run more often on a fresh install, especially when adding ppas. After it gets a full index the size and time it runs is much smaller in future runs.

      As Snowhog alludes to, recent Kubuntu versions don't seem to have this resource hogging, though 16.04 does seem to exhibit this.

      Sent from my LG-H931 using Tapatalk

      Comment


        #4
        Hi Snowhog and claydoh,
        Thank you both for your replies! Here is some basic info about my system:

        Code:
        ~$ inxi -Sxx
        System:Host: kubuntu Kernel: 4.15.0-23-generic x86_64 bits: 64 gcc: 7.3.0
        Desktop: KDE Plasma 5.12.5 (Qt 5.9.5) dm: sddm,sddm
        Distro: Ubuntu 18.04 LTS
        I have a very low end laptop, therefore I thought if I could prevent apt-xapian-index from running I could lift off some weight from its shoulder.Actually, I have already done this in other Ubuntu 18.04 flavors (Xubuntu and MATE) but then only one package was removed and nothing else. I can still run apt update and use Synaptic. I haven't noticed any problem caused by the removal of apt-xapian-index. It seems to be more essential to how package management is being done in Kubuntu.

        Looking forward your comments and if there is need for further info, just let me know.

        Cheers

        Comment


          #5
          Originally posted by philotux View Post
          Code:
          ~$ inxi -Sxx
          System:Host: kubuntu Kernel: 4.15.0-23-generic x86_64 bits: 64 gcc: 7.3.0
          Desktop: KDE Plasma 5.12.5 (Qt 5.9.5) dm: sddm,sddm
          Distro: Ubuntu 18.04 LTS
          You could have instead provided the output of inxi -Fxz which would be more informative.

          BTW, I'm not a fan of this either: Why has Kubuntu installed apt-xapian-index on my system?
          Kubuntu 20.04

          Comment


            #6
            For what it's worth:
            2 Rogue Processes Causing High CPU Usage
            which credits
            http://vk5hse.blogspot.com/2014/08/u...e-manager.html
            which credits
            https://bugs.launchpad.net/ubuntu/+s...33/comments/19
            Kubuntu 20.04

            Comment


              #7
              It refers to process:
              Code:
              /usr/bin/python3/usr/sbin/update-apt-xapian-index --batch-mode --force --update
              Maybe someone can figure out how to change this "force" to something else?

              It would be ideally if it could run only when I start Muon.

              I also found
              https://bugs.launchpad.net/ubuntu/+s...ex/+bug/363695
              and some workarounds here:
              https://ubuntuforums.org/showthread.php?t=1062688

              Comment


                #8
                Thanks chimak111 and gnomek for the input.
                I am beginning to realize that there are more things involved here than a simple removal of a package. I surely need to read up a bit on this and look into the links you have posted.

                Here is my:

                Code:
                ~$ inxi -Fxz 
                System:    Host: kubuntu Kernel: 4.15.0-23-generic x86_64 bits: 64 gcc: 7.3.0 
                       Desktop: KDE Plasma 5.12.5 (Qt 5.9.5) Distro: Ubuntu 18.04 LTS 
                Machine:   Device: laptop System: ASUSTeK product: E402MA v: 1.0 serial: N/A 
                       Mobo: ASUSTeK model: E402MA v: 1.0 serial: N/A 
                       UEFI: American Megatrends v: E402MA.207 date: 01/28/2016 
                Battery    BAT0: charge: 23.3 Wh 97.3% condition: 23.9/32.2 Wh (74%) 
                       model: ASUSTeK E402-40 status: Charging 
                CPU:       Dual core Intel Celeron N2840 (-MCP-)  
                       arch: Silvermont rev.8 cache: 1024 KB 
                       flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8663 
                       clock speeds: max: 2582 MHz 1: 701 MHz 2: 725 MHz 
                Graphics:  Card: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display 
                       bus-ID: 00:02.0 
                       Display Server: x11 (X.Org 1.19.6 ) 
                       drivers: modesetting (unloaded: fbdev,vesa) 
                       Resolution: 1366x768@60.06hz 
                       OpenGL: renderer: Mesa DRI Intel Bay Trail 
                       version: 4.2 Mesa 18.0.0-rc5 Direct Render: Yes                            
                Audio:     Card Intel Atom Processor Z36xxx/Z37xxx Series High Def. Audio Controller  
                       driver: snd_hda_intel bus-ID: 00:1b.0                                      
                       Sound: Advanced Linux Sound Architecture v: k4.15.0-23-generic             
                Network:   Card-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter         
                       driver: ath9k bus-ID: 02:00.0                                              
                       IF: wlp2s0 state: up mac: <filter>                                         
                       Card-2: Realtek RTL8101/2/6E PCIE Fast/Gigabit Ethernet controller         
                       driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 03:00.2                     
                       IF: enp3s0f2 state: down mac: <filter>                                     
                Drives:    HDD Total Size: 250.1GB (10.9% used)                                       
                       ID-1: /dev/mmcblk0 model: N/A size: 31.3GB                                 
                       ID-2: /dev/sda model: Samsung_SSD_860 size: 250.1GB                        
                Partition: ID-1: / size: 20G used: 7.8G (43%) fs: ext4 dev: /dev/sda12                
                       ID-2: swap-1 size: 2.15GB used: 0.00GB (0%)                                
                       fs: swap dev: /dev/mmcblk0p2                                               
                RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present                
                Sensors:   System Temperatures: cpu: 6280.0C mobo: N/A                                
                       Fan Speeds (in rpm): cpu: 3500                                             
                Info:      Processes: 176 Uptime: 12 min Memory: 968.7/1875.8MB                       
                       Init: systemd runlevel: 5 Gcc sys: N/A                                     
                       Client: Shell (bash 4.4.191) inxi: 2.3.56

                Comment


                  #9
                  @philotux,

                  The fix outlined in http://vk5hse.blogspot.com/2014/08/u...e-manager.html which I linked to earlier seems a decent way to deal with the issue.

                  It involves installing cpulimit, a tiny program, from the software repo and then modifying the single file that "orchestrates" the indexing. Essentially, a bit is added to limit, by means of cpulimit, the CPU usage of this particular process to just 5% (or to whatever other value you choose).

                  I have a slightly more competent machine than yours and so I just grin and bear it. But, if you ask nicely (pun intended), one of the more competent folks here may advise you on the suitability of going the cpulimit route.

                  Or you could just use sudo apt update and sudo apt upgrade and the rest from a terminal to avoid resource-intensive (depending on one's hardware) tools such as Muon and Discover.
                  Kubuntu 20.04

                  Comment


                    #10
                    Originally posted by chimak111 View Post
                    @philotux,

                    The fix outlined in http://vk5hse.blogspot.com/2014/08/u...e-manager.html which I linked to earlier seems a decent way to deal with the issue.

                    It involves installing cpulimit, a tiny program, from the software repo and then modifying the single file that "orchestrates" the indexing. Essentially, a bit is added to limit, by means of cpulimit, the CPU usage of this particular process to just 5% (or to whatever other value you choose).
                    Thanks for this pointer and the explanation. It is certainly an option to consider in order to prevent apt-xapian-index to consume that much CPU resource on this poor machine of mine.

                    Or you could just use sudo apt update and sudo apt upgrade and the rest from a terminal to avoid resource-intensive (depending on one's hardware) tools such as Muon and Discover.
                    This is also what I do normally. But sometimes I use Discover to window shopping a bit and I like Muon an it's counterpart Synaptic for just an easy to access relevant information about packages and also for installing/uninstalling, updating etc.

                    If I am not mistaken, apt-xapian-index is more incorporated in the package managing in Kubuntu than it is in Xubuntu for example and even Linux Mint. For the sake of experiment, I just removed the package in LM 19 beta. No other packages was listed to be removed along with it. So far everything seems to be working alright. I can still use Synaptic to update the cache, search and install packages. The only noticeable change is that searching is somewhat slower. It takes 3-4 seconds as opposed to almost instantaneous hit when a-x-i was installed.

                    I think, just for satisfying my curiosity, to rename /usr/share/apt-xapian-index to something else in Kubuntu and see if it prevents it from running even when using Muon or Discover and try to find out if this will affect the function of these in a negative way.
                    Last edited by Guest; Jun 24, 2018, 06:44 AM.

                    Comment


                      #11
                      Remember that you can uninstall muon and discover and search for packages in Terminal
                      https://askubuntu.com/questions/1608...e-command-line

                      Comment


                        #12
                        Originally posted by gnomek View Post
                        Remember that you can uninstall muon and discover and search for packages in Terminal
                        https://askubuntu.com/questions/1608...e-command-line
                        Lots of useful command lines there, Thanks!

                        Comment


                          #13
                          What Snowhog says:

                          Code:
                          [FONT=courier new][B]sudo apt-cache rdepends apt-xapian-index[/B][/FONT]
                          apt-xapian-index
                          Reverse Depends:
                            software-center
                            python-apt
                            python-apt
                            python-apt
                            muon
                            muon
                            muon
                            muon
                            libqapt3
                            libqapt3
                            libqapt3
                            libqapt3
                            muon
                            libqapt3
                            python-apt
                            packagekit-backend-aptcc
                            ubuntu-kylin-software-center
                            synaptic
                            python-apt
                            packagesearch
                            muon
                            goplay
                            aptitude
                            packagekit-backend-aptcc
                          
                           [FONT=courier new][B]sudo apt-cache depends apt-xapian-index[/B][/FONT]
                          apt-xapian-index
                            Depends: python3-xapian1.3
                            Depends: python3-apt
                            Depends: python3-debian
                            Depends: <python3:any>
                              python3:i386
                              python3
                            Suggests: app-install-data
                            Suggests: python3-xdg
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Thanks for the input GreyGeek!

                            I think I understand better now the mutual dependency relationship between these packages. I have definitely changed my mind regarding the removal of
                            apt-xapian-index since I want to keep those packages that are to be removed otherwise.

                            However, I still wanted to experiment with disabling the updates to the Xapain index and see if it stops running almost every time I run Muon or Discover and therefore I did the following:
                            Code:
                            sudo chmod -x /usr/sbin/update-apt-xapian-index
                            in order to make it non-executable.

                            I have since launched both muon and discover and they seem to be functioning as normal. I have searched and installed packages, updated the cache and installed the updates. I even added an additional repository to see if those packages will show in muon and discover which they did after updating the cache. So far things look as they should.

                            I could then do a manual update once in a while by executing the following commands:
                            Code:
                            sudo chmod +x /usr/sbin/update-apt-xapian-index
                            sudo update-apt-xapian-index -u
                            which then will perform an "incremental update, reindexing only those packages whose version has changed since the last run" (man update-apt-xapian-index).

                            Please give your comments and share your thoughts. Being still much of a novice in the process of learning things Linux, I will greatly appreciate all input from you all.
                            Last edited by Guest; Jun 25, 2018, 09:35 AM.

                            Comment


                              #15
                              I rarely use the file search functions in the desktop. I usually open a Konsole and use "locate". It is updated everyday with a cron job in /etc/cron.daily. Or, I can issue "sudo updatedb" in a Konsole and update the locate database manually, after I've made changes. Locate is a lot faster in a Konsole than the desktop search, IME.

                              If I want to search text files for a word or phrase I use grep:
                              grep -B3 -A4 hide /home/jerry/Documents/FOIA/FOIA/mail/*

                              man grep
                              explains things.

                              That command allows me to search 1,027 emails released in the 2009 FOIA CRU whistleblower file for the word "hide". If I do this within kate I get a list of all the matches. If I click on a match that document is opened in Kate and the line where the word occurs is highlighted. I similar search allows me to look through over 5000 emails in the 2011 CRU release.
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X